Color processing involves manipulating the color channels of an image. This includes adjusting the color balance, contrast, or converting a color image to monochrome.

カラープロセッシングでは、色のチャンネルを操作して色のバランスやコントラストの調整、カラー画像をモノクロに変換するといった処理を行います。

<aside> 💡 All examples on this page use GLSL shaders. To learn more about shaders, please read The Book of Shaders. The pages on shaping functions and colors will be particularly useful. このページでは、すべてのサンプルでGLSLシェーダを使用しています。シェーダについて詳しく知りたい場合は、The Book of Shadersを読んでください。特にシェイピング関数色についてのページが役立つと思います。

</aside>

Let's focus on the color of a single pixel. We can think of color processing as a function that takes the color values of the pixel and converts them to different values. On this page, we assume each pixel has three channels: red (R), green (G), and blue (B), with values ranging from 0.0 to 1.0.

1つピクセルの色だけに注目してみましょう。カラープロセッシングは、このピクセルの色の値を異なる値に変換する関数だと考えることができます。このページでは、各ピクセルに赤(R)、緑(G)、青(B)の3つのチャンネルがあり、値は0.0から1.0までの範囲にあると仮定します。

Screenshot 2023-04-23 at 2.45.29 PM.png

Brightness and Contrast 明るさとコントラスト

Consider a simple function as shown below. $C_{before}$ is the original color, while $C_{after}$ is the color resulting from the process.

下のようなシンプルな関数を考えてみましょう。$C_{before}$は元の色で、$C_{after}$はプロセスの結果の色です。

$C_{after} (R, G, B) = C_{before} (R, G, B) * 0.75$

https://codepen.io/kynd/pen/abRpeOP?editors=0010