RGB Color Mode#
The RGB color mode is widely used and it forms various colors by changing and overlaying the three color channels: red, green, and blue. However, RGB is device-dependent, meaning that different devices may detect and reproduce the same RGB value differently.
Additive Color Mixing for RGB Mode#
Representation of RGB#
Numerical Representation#
It is described using a three-dimensional vector and is often represented using eight-bit hexadecimal numbers. For example, the color sky blue can be represented as 66ccff. Each two-digit hexadecimal number represents a component (r, g, b).
Of course, some advanced devices used by the wealthy may use a larger range of values to describe colors
CMYK Color Mode for Printing#
As the name suggests, this color mode is used for full-color printing, and the four standard colors are cyan (C), magenta (M), yellow (Y), and black (B).
CMYK Mixing#
Unlike RGB, CMYK is a subtractive mixing mode. When the three colors CMY are mixed, it produces a dark gray color.
HSL and HSV (HSB) Color Spaces#
Both HSL and HSV represent RGB points in a cylindrical coordinate system, which is more intuitive.
HSL represents hue, saturation, and lightness. HSV represents hue, saturation, and value.
Hue, Saturation, and Lightness (Brightness)#
-
Hue (H): The basic attribute of color, such as red, yellow, etc.
-
Saturation: The purity of color. Higher saturation means purer color, while lower saturation tends to be more grayish.
-
Lightness (Brightness): As the name suggests, it ranges from 0% to 100%.
Comparison between HSL and HSV#
HSV is commonly used in Adobe software, while HSL is used in CSS3 specifications.
In HSL, the saturation component always changes from fully saturated color to equivalent gray (in HSV, when the value V is at its maximum, the saturation changes from fully saturated color to white, which can be considered counterintuitive).
In HSL, the lightness spans the full range from black through the chosen hue to white (in HSV, the V component only covers half of the journey from black to the chosen hue).
YUV (Y'CbCr)#
YUV was invented during the transition from black and white to color television. Black and white video only has the Y video (luminance value). YUV color encoding mode is commonly used in streaming media, where U represents chrominance and V represents luminance. Y'CbCr is a compressed version of YUV and is commonly used in the digital imaging field, while YUV is commonly used in the analog signal field.
Formats:
Packed format: Stores the values of YUV as a Macro Pixels array, similar to how RGB is stored.
Planar format: Stores the three YUV components in separate matrices.
Note: Macro Pixels array refers to macro pixels.
Lab Color Space#
In the Lab color space, L represents lightness, and a and b represent the opposing dimensions of color.
Lab colors are designed to be close to human vision and aim for perceptual uniformity. In image editing software like Photoshop, there is a "Lab mode," and PDF also uses the "Lab color space."