RGB

On this page 7

RGB is the additive color model that describes a color as a mix of red, green and blue light at varying intensities. In color theory and design, RGB is the native model of anything that emits light, including monitors, phones, projectors and cameras, and it is the starting point for nearly every color used in digital work.

Strictly speaking, RGB is a model, not a complete color specification. The triplet 255, 0, 0 means full red, but which red depends on the color space attached to the numbers, such as sRGB, Display P3 or Adobe RGB.

How additive RGB mixing works

Additive mixing starts from black, the absence of light, and adds light from three primaries. Red and green light combine to yellow, green and blue to cyan, red and blue to magenta, and all three at full intensity produce white. Equal amounts of all three at lower intensity produce neutral grays.

The model works because human color vision relies on three types of cone cells, sensitive to long, medium and short wavelengths. A display does not reproduce the spectrum of a real object; it produces a metameric match, a mix of three primaries that stimulates the cones in the same proportions and is therefore seen as the same color.

RedGreenBluePerceived result
FullOffOffRed primary
FullFullOffYellow secondary
OffFullFullCyan secondary
FullOffFullMagenta secondary
FullFullFullWhite
HalfHalfHalfMiddle gray, nonlinear in light
Basic additive mixtures

Encoding RGB values

Digital RGB stores each channel as a number. The most common form uses 8 bits per channel, giving values from 0 to 255 and about 16.7 million combinations. Design tools and CSS also express the same values as hexadecimal codes such as #FF5733, where each pair of digits is one channel.

NotationExampleRange per channelTypical use
8-bit integerrgb(255, 87, 51)0 to 255Web, interface design
Hexadecimal#FF573300 to FFCSS, style guides
Normalized float1.0, 0.34, 0.200.0 to 1.0Shaders, color science
10-bit1023, 349, 2040 to 1023HDR video, wide-gamut displays
16-bit65535, 22359, 131070 to 65535Photo editing, print preparation
Common RGB notations and bit depths

RGB values in common color spaces are gamma encoded, not proportional to light. A value of 128 in sRGB emits only about a fifth of the light of 255, because the encoding spends more codes on dark tones where vision is more sensitive. Blending, blurring and resizing in encoded values instead of linear light causes dark fringes and muddy gradients.

RGB color spaces and gamut

A color space fixes the exact chromaticity of the three primaries, the white point and the transfer curve. The range of colors the primaries can produce is the gamut. The same numbers in different spaces produce different colors, which is why untagged images often look dull or oversaturated on another device.

Color spaceGamut sizeWhite pointTypical use
sRGBStandard, smallest of theseD65Web default, most consumer displays
Display P3About a quarter larger than sRGBD65Modern phones, laptops, wide-gamut web
Adobe RGBWider in greens and cyansD65Photography aimed at print
Rec. 2020Very wideD65HDR and ultra-high-definition video
Widely used RGB color spaces

In practice, sRGB is the safe default for anything shown on screens, while wider spaces only pay off when both the content and the display support them and the file carries an embedded color profile.

RGB compared with other color models

RGB is device oriented: its numbers describe how much power to send to each primary, not how humans think about color. Other models in color theory reorganize the same information to make adjustment or printing easier.

ModelBasisStrengthLimitation
RGBAdditive light primariesNative to screens and camerasHard to adjust hue or lightness intuitively
HSLHue, saturation, lightness derived from RGBIntuitive picking and themingLightness is not perceptually uniform
CMYKSubtractive inks on paperMatches the printing processSmaller gamut, device specific
CIELAB and OKLCHPerceptual lightness and chromaEven steps, reliable contrastSome values fall outside display gamuts
RGB and related models

Designers often pick colors in HSL or OKLCH and let the software convert them to RGB for display. Thinking of hue, saturation and lightness is easier for building color harmony and complementary schemes, while the stored and rendered values remain RGB.

Common pitfalls when working in RGB

Most RGB problems come from missing color management or from treating encoded numbers as if they were light. The following mistakes are the most frequent in design and production work.

  • Untagged files: images without an embedded profile are interpreted as sRGB and may shift on wide-gamut screens.
  • Out-of-gamut print colors: saturated RGB blues and greens often cannot be reproduced in CMYK and turn dull in print.
  • Equal values are not equal brightness: pure green looks far brighter than pure blue at the same value, so check contrast with a perceptual measure.
  • Uncalibrated monitors: color decisions made on an unprofiled display do not transfer reliably to other devices.
  • Banding: 8-bit gradients across large areas can show visible steps; higher bit depth or slight dithering hides them.

Put simply

Every color on a screen is made from tiny red, green and blue lights placed so close together that the eye blends them. Turn all three up fully and you see white; turn them all off and you see black. Different mixes of the three create every other color.

An RGB value is simply a recipe that says how bright each of the three lights should be. The catch is that different screens use slightly different reds, greens and blues, so the same recipe can look a little different from one device to another unless the file says which version of the lights it expects.

In practice

A design team defines a brand orange as #FF5A1F in sRGB for its website. When the same orange is used in a mobile app on wide-gamut phones, some designers want a more vivid version, so the team adds a Display P3 value for supporting devices and keeps the sRGB value as the fallback.

For printed brochures, the team checks the orange in a soft-proof and finds it slightly outside the printer’s CMYK gamut. They choose a dedicated print value instead of letting software convert automatically, and they test text contrast against white using a perceptual measure rather than raw RGB numbers.

The orange now looks consistent across web, app and print, and the style guide lists each value with its color space so that no one has to guess which version to use.