RGB stands for red, green and blue, the three colours of light that every phone, monitor and TV screen mixes to display colour. Each pixel contains tiny red, green and blue elements, and by varying their brightness the screen can show millions of different colours. Any colour you see on a website is ultimately an RGB value.
How mixing light works
RGB is an additive model: you start from black (no light) and add light. All three channels at full strength make white; all three off make black. Red plus green light makes yellow, green plus blue makes cyan, and red plus blue makes magenta. This is the opposite of mixing paint, where adding colours makes things darker.
On the web each channel is usually given a value from 0 to 255. In CSS you write rgb(255, 102, 0) for a bright orange. Modern CSS also accepts a space-separated form with transparency, rgb(255 102 0 / 50%). The same colour as a hex code is #FF6600: hex is simply RGB written in base sixteen.
RGB versus CMYK
Printers do not use light. They lay down cyan, magenta, yellow and black ink (CMYK), which absorbs light reflected off paper. Some vivid RGB colours, especially bright greens, blues and oranges, cannot be printed exactly, so they come out duller on business cards than on screen. Design for the web in RGB; send print files in CMYK or give the printer a Pantone reference.
Example: a logo that looks wrong online
A gym's logo was designed for printed flyers and saved as a CMYK file. Uploaded to the website as-is, the colours appear muddy or slightly off, and some browsers handle CMYK JPEGs poorly. Exporting the logo again in the sRGB colour space, the standard RGB profile for the web, fixes it.
When small businesses need to think about RGB
Mostly when moving colours between print and screen, exporting images, or filling in a design tool that asks for RGB values. Brand guides should list each colour as RGB or hex for digital use and CMYK for print.
RGB mistakes
- Uploading CMYK images. Convert photos and logos to sRGB before putting them on a site.
- Expecting screen colours in print. Ask for a proof when colour accuracy matters.
- Trusting one screen. Displays vary in calibration; check important colours on a phone and a laptop.
- Using values above 255. Browsers clamp them, so the colour silently changes.
Related terms
- Hex code: a compact notation for RGB values.
- Color palette: a brand's set of chosen colours.
- CSS: where RGB values are written on a website.
- Brand guidelines: where RGB and CMYK versions of a colour are listed.