RGB Color Mode#
The RGB color mode is widely used. This mode uses the variations and combinations of the red, green, and blue color channels to create various colors. However, RGB depends on the device, so different devices may detect and reproduce the same RGB value differently.
Additive Primary Colors (RGB)#
Representation of Primary Colors#
Numerical Representation#
It is described using a three-dimensional vector and is mostly represented using eight-bit hexadecimal numbers. For example, sky blue is represented as 66ccff. Each pair of hexadecimal numbers 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#
As the name suggests, this color mode is used for full-color printing. 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 CMY colors are mixed, it produces a dark gray color.
HSL and HSV (HSB) Color Spaces#
Both HSL and HSV convert the points of RGB into 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 property of color, such as red, yellow, etc.
-
Saturation: The purity of the color. Higher saturation means purer color, while lower saturation means more grayness.
-
Lightness (Brightness): As the name suggests, it ranges from 0% to 100%.
Comparison between HSL and HSV#
HSV is commonly used in the Adobe series, while HSL is used in CSS3 specifications.
In HSL, the saturation component always changes from fully saturated color to equivalent gray (in HSV, at maximum value V, the saturation changes from fully saturated color to white, which can be considered counterintuitive).
In HSL, the lightness spans the entire range from black to 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, commonly used in the digital image 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 color-opponent dimensions.
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."