RGB on devices


The values we usually use on devices and in coding can be thought of as a specific range that can be reproduced on the actual device cut out from the XYZ color space.


When expressing color with numbers, it is crucial to understand what they represent. If CIE RGB and XYZ are absolute values indipendent from devices, the RGB values that we normally use are local values set for each device.

色を数値で表す際にはその値が何を表しているのかを理解することが重要です。CIE RGBやXYZが機器に左右されない、ある意味絶対的な数値だとすれば、普段使うRGBは機器ごとに設定されたローカルな値です。

If we map the darkest color (black), brightest color (white), and the purest red, green, and blue that a device can represent to XYZ values, we get a hexahedron in the XYZ color space (8 vertices are needed, the rest are magenta, cyan, and yellow, and these values (Actually we need 8 vertices, but the rest - magenta, cyan, and yellow can be calculated from other colors).


Screenshot 2023-02-07 at 9.53.26 PM.png

Technically we can crop any range, but we don't want the results to vary from device to device. Standards such as sRGB and AdobeRGB define which range of XYZ the RGB values correspond (or should correspond) to. If a device uses sRGB, it means that the RGB values on the device are adjusted to be as close as possible to the XYZ values defined by the standard.


If devices are set to use a different standards, or if they are not calibrated correctly, a same set of RGB values will produce different colors.