RGB
An additive color model that combines red, green, and blue light to reproduce colors. It is the foundation of color representation on displays, cameras, and web content.
RGB is an additive color model producing colors by combining varying intensities of red, green, and blue light. Maximum intensity yields white; zero yields black. This mirrors display hardware where each pixel contains RGB subpixels with independently controlled brightness.
In 8-bit RGB, each channel ranges from 0 to 255, yielding approximately 16.7 million possible colors. 16-bit or 32-bit floating-point representations are another option for preserving tonal smoothness across multiple adjustment passes.
- sRGB: The default color space for CSS. It uses a nonlinear tone curve with an effective gamma of approximately 2.2. CSS colors like
#FF8800are interpreted as sRGB - Adobe RGB: Encompasses a wider gamut than sRGB, particularly in the cyan-green region
- Display P3: Adopted by Apple devices, with a wider gamut than sRGB. CSS supports it via
color(display-p3 1 0.5 0)
Operations assuming linear light, such as alpha blending or physically-based shading, must first linearize gamma-encoded (nonlinear) RGB values. GPUs can perform sRGB-to-linear conversion in hardware when sampling textures.