Skip to content
BENIBIX Learn

RGB Color Model

Also known as RGB, Red Green Blue

How screens make color: red, green and blue light mixed together.

Think of it like

It is like shining three torches on a wall: red, green and blue. Where they meet, new colors appear.

Example

Lucy sets a button to rgb(0 120 255). Full blue, some green and no red give a bright sky blue.

Why it matters

Every color you see on a screen is RGB, so all screen design ends up in it.

Definition

RGB is the way screens make color, by mixing red, green and blue light. Each of the three is set from 0 to 255. All three at 255 make white, and all at 0 make black. This is called additive color, because adding light makes it brighter. It can show about 16.7 million colors.

Example code

css
color: rgb(255 0 0);     /* red */
color: rgb(255 255 255); /* white */
color: rgb(0 0 0);       /* black */
Three numbers from 0 to 255: red, green and blue light.
RGB is on the left. Red, green and blue light add up to white.

Common mistake

Sending an RGB file straight to a printer. Bright screen colors often print dull.

Key takeaways

  1. 1
    Light, not ink. Red, green and blue mixed.
  2. 2
    Adding makes white. All three full is white.
  3. 3
    For screens. Print uses CMYK.

Compare

Learn it properly