Sub topic 1
What a colour model is and why there is more than one
Prerequisites
This chapter assumes you have these skills:
- You have worked with digital images or design software, such as opening a file, picking a fill colour, or exporting a PNG or PDF.
- You are comfortable with simple arithmetic and base-10 numbers.
- Optional: you can read short CSS, JavaScript, or Python snippets. The code here is small, and you can skip it without losing the main ideas.
You do not need to know what RGB, CMYK, or hex mean yet. Later chapters cover each in detail. This chapter gives you the working model that the rest of the tutorial builds on.
What a colour model is
A colour model is a rule for describing a colour with a small set of numbers. It names a fixed list of channels and says what each number means. For example, "three numbers, each from 0 to 255, for red, green and blue light" is a colour model.
A colour model answers one question: how do I write down a colour so that someone else can recreate it? The answer has two parts:
- The ingredients. These are the channels, such as red, green, and blue.
- The mixing rule. This says how the ingredients combine. Light sources add together. Inks and pigments remove light.
A colour model alone does not fix the exact colour. The numbers 255, 136, 0 tell you the proportions of three ingredients, but not how bright or pure those ingredients are on a given device. That second piece is a colour space, which a later chapter covers. For now, keep this split in mind:
- The model defines the structure: which channels exist and how they combine.
- The space defines the meaning: which exact colours those numbers point to.
Colour is a perception, not a property
Your eye has three kinds of cone cells. Each responds most strongly to a different band of wavelengths, roughly long (reddish), medium (greenish), and short (bluish). Your brain compares their signals and produces the sensation of colour.
This has a practical consequence. Because your vision reduces any light to three signals, a device can fool you by producing just the right three signals. A screen does not need to emit the exact wavelengths of an orange. It only has to stimulate your cones the same way. This is why three numbers are enough to describe most colours a person can see, and why most colour models use three or four channels.
Why there is more than one model
If one model were enough, design software would offer one. There are several because devices produce colour in different physical ways, and a model is only useful when its mixing rule matches the device.
| Situation | Physical process | Model that matches it |
|---|---|---|
| Monitor, phone, TV, projector | Emits light | RGB |
| Offset press, inkjet, laser printer | Ink absorbs light reflected from paper | CMYK |
| Writing colours in CSS or design tokens | Text notation for 8-bit RGB | Hex |
You can group the reasons into three.
Reason 1: the mixing rule differs
A screen starts dark and adds light. Paper starts bright and ink subtracts light. These are opposite processes, and they need different arithmetic.
- In an additive model, more of every channel moves toward white.
- In a subtractive model, more of every channel moves toward black (or a muddy dark brown, in practice).
Setting every RGB channel to its maximum gives white. Setting cyan, magenta, and yellow ink to their maximum gives a dark, murky colour. The same instinct ("more means brighter") gives the wrong result if you use it in the wrong model.
Reason 2: each device has a limited range
Every device can reproduce only some of the colours people can see. A bright, saturated screen green may have no ink equivalent. A deep printed cyan may be outside what a laptop panel can show. Different models, together with the spaces built on them, cover different ranges. A later chapter calls this range the gamut.
Reason 3: people need different notations
Even for the same physical process, you may want different ways to write the colour:
- A designer in an editor drags sliders.
- A developer pastes a short text code into a stylesheet.
- A script needs numbers it can compute with.
Hex and rgb() are two notations for the same RGB colour. They are not two different models. Keep that distinction clear: a model changes what the channels mean, and a notation changes only how you write them down.
.button {
background-color: #ff8800;
border-color: rgb(255 136 0);
color: #fff;
}In this rule, #ff8800 and rgb(255 136 0) describe the same orange. The shorthand #fff expands to #ffffff, which is white. No conversion between models happens here. Only the writing changes.
A map of the models in this tutorial
The tutorial covers three names. Their relationship is easy to get wrong, so here it is as a diagram.
Read the diagram top to bottom:
- RGB and CMYK are models. Each follows from a physical mixing rule.
- Hex is not a third model. It hangs off RGB because it is a way to write RGB values.
- Both models need a colour space before their numbers mean a specific colour, and conversion between them goes through that meaning.
Models in practice: the same colour, different numbers
To see why there is more than one model, take one orange and describe it in each.
- RGB:
255, 136, 0. Full red, a little over half green, no blue. This tells a screen how much of each light to emit. - Hex:
#ff8800. The same three numbers written in base 16. - CMYK (naive estimate): about
0%, 47%, 100%, 0%. No cyan, a moderate amount of magenta, full yellow, no black. This tells a press how much of each ink to lay down.
The numbers have no obvious resemblance, but they describe the same intent. The CMYK values above come from a simple formula that the conversion chapter explains and then criticises. Here is a short script that computes them, so you can see the shape of the idea now.
def rgb_to_cmyk_naive(r, g, b):
r, g, b = r / 255, g / 255, b / 255
k = 1 - max(r, g, b)
if k == 1:
return 0.0, 0.0, 0.0, 1.0
c = (1 - r - k) / (1 - k)
m = (1 - g - k) / (1 - k)
y = (1 - b - k) / (1 - k)
return c, m, y, k
print(rgb_to_cmyk_naive(255, 136, 0)) # (0.0, 0.466..., 1.0, 0.0)Treat this output as an illustration, not a production result. The formula assumes ideal inks and ideal paper, and real ones are neither. A real conversion uses an ICC profile, which is a data file that describes how a specific device or paper behaves. A later chapter covers it.
What a model does not tell you
A frequent mistake is to assume that matching numbers means matching colours. It does not. Here are the gaps a model leaves open.
- Which red, green and blue? Two screens can both take
255, 0, 0and show different reds, because their red emitters differ. - How bright? The numbers do not state how many candelas per square metre the screen produces. Brightness settings change what you see.
- How are values encoded? Channel numbers are usually not proportional to light intensity. The sRGB chapter shows that a value of 128 is only about 22% of full light.
- What is the viewing light? Printed colour depends on the lamp that lights the paper.
Choosing by destination
Because models match devices, the first workflow question is always where the work will end up. Use this quick rule while you wait for the later chapters on the full workflow.
| Destination | Start with | Notation you will see |
|---|---|---|
| Website or web app | RGB (sRGB space) | Hex, `rgb()` |
| Mobile app interface | RGB | Hex, or separate 0–255 values |
| Video and presentation | RGB | Usually sliders or hex |
| Commercial printing | CMYK, using the printer's profile | Percentages for C, M, Y, K |
| Both screen and print | Design in RGB, then convert deliberately | Both |
The last row is the hardest. A logo used on a website and on a business card needs an RGB version and a CMYK version, each checked on its own medium. The final chapter of this tutorial covers that workflow.
Common errors at this stage
These misunderstandings cause most colour problems later. You can spot them early.
- Treating hex as a separate model. Hex is RGB written in base 16. Converting
#ff8800torgb(255 136 0)changes nothing about the colour. - Expecting CMYK to behave like RGB. Adding more ink does not make a colour brighter. It makes it darker.
- Assuming conversion is lossless. Converting from a larger range to a smaller one loses information, and the original cannot be recovered by converting back.
- Judging print colour on a screen without a profile. A monitor is an RGB light source. It can only imitate how paper looks, and the imitation is only as good as the profile and the calibration.
- Mixing up model and space. "RGB" is not a complete description. You need to know which RGB space, such as sRGB, the numbers belong to.
How the rest of the tutorial builds on this
The remaining chapters take each box of the diagram in turn.
- Additive mixing and the RGB model, including channel values, bit depth, and hex.
- Subtractive mixing and the CMYK model, including why black ink exists.
- Colour spaces, gamut, and sRGB with its non-linear encoding.
- Conversion, from the naive formula to ICC profiles and rendering intents.
- A practical workflow for choosing a model for web, app, and print.
By the end, you should be able to look at a design destination and decide which model to work in, which notation to use, and when a conversion is needed.
Check your understanding
Exercise
A teammate says, "Hex and RGB are different colour models, so converting #ff8800 to rgb(255 136 0) will change the colour slightly." Is this correct? Explain, and name which part of a colour description a model controls and which part a notation controls.
Show answer
It is not correct. Hex is a notation for RGB, not a separate model. #ff8800 and rgb(255 136 0) hold the same three channel values (255, 136, 0), written in base 16 and base 10, so the colour is identical. A model controls what the channels are and how they combine (red, green and blue light adding together). A notation controls only how those channel values are written as text.
Exercise
You set every channel to its maximum in two systems. In system A you set red, green and blue light to 255. In system B you set cyan, magenta and yellow ink to 100%. Predict the result in each, and explain the difference using the words additive and subtractive.
Show answer
System A gives white, because RGB is additive: each channel adds more light, and full red, green and blue light together look white. System B gives a dark, muddy colour close to black, because CMY is subtractive: each ink absorbs more of the light reflecting from the paper, so less light returns to your eye. In practice real inks do not absorb perfectly, which is why the result is murky brown rather than a clean black, and why CMYK adds a separate black ink (K).
Exercise
A client sends a brand colour as #ff8800 and asks for it on business cards. Name two pieces of information you still need before you can print it reliably.
Show answer
You need the CMYK values or the target print conditions, and the colour space or profile. Hex only gives RGB values and does not say how to turn them into ink amounts. You need the printer's ICC profile (or the brand's approved CMYK recipe) so the conversion matches the paper and press. You should also confirm which RGB space the hex value assumes, which is normally sRGB for web colours.