Primary colors are the small set of colors that all other colors in a system are mixed from. Which colors count as primary depends on the system: red, green, and blue for screens (RGB); cyan, magenta, and yellow for printing ink (CMY); and red, yellow, and blue in traditional painting (RYB). Secondary colors mix two primaries, and tertiary colors mix a primary with a neighboring secondary.
Primary Color Models Compared
| Model | Primaries | Secondaries | Used For | Type |
|---|---|---|---|---|
| RGB | Red, Green, Blue | Cyan, Magenta, Yellow | Screens, web and app UI | Additive light |
| CMY / CMYK | Cyan, Magenta, Yellow (+ Black) | Red, Green, Blue | Printing, packaging | Subtractive ink |
| RYB | Red, Yellow, Blue | Orange, Green, Purple | Traditional painting, art education | Subtractive pigment |
RYB is a traditional teaching model rather than a precise one: mixing paint red and blue gives a dull purple, because red and blue pigments each absorb much of the light the other reflects. CMY is the more accurate set of subtractive primaries, which is why printers use it. The additive vs subtractive guide explains why RGB and CMY mirror each other.
For web and UI work, RGB is the model that matters, because it maps directly to the values in CSS, design tools, and color pickers.
Primary Colors in RGB and HSL
Each RGB primary is one channel at full intensity. In HSL, the primaries sit 120° apart on the color wheel.
Red: rgb(255, 0, 0) → #FF0000 → hsl(0, 100%, 50%)
Green: rgb(0, 255, 0) → #00FF00 → hsl(120, 100%, 50%)
Blue: rgb(0, 0, 255) → #0000FF → hsl(240, 100%, 50%)
These pure values are too intense for most interfaces, but their positions at 0°, 120°, and 240° are the reference points for every harmony built on the HSL wheel.
Secondary Colors
Secondary colors are made by mixing two primaries at full strength. In RGB, light mixes into cyan, magenta, and yellow:
Red + Green = Yellow
Red + Blue = Magenta
Green + Blue = Cyan
Yellow: rgb(255, 255, 0) → #FFFF00 → hsl(60, 100%, 50%)
Magenta: rgb(255, 0, 255) → #FF00FF → hsl(300, 100%, 50%)
Cyan: rgb(0, 255, 255) → #00FFFF → hsl(180, 100%, 50%)
Each secondary sits halfway between two primaries, and directly opposite the primary it does not contain: yellow (60°) is opposite blue (240°), which is why yellow and blue are complementary on screen.
Tertiary Colors
Tertiary colors sit between a primary and a neighboring secondary, at the 30° steps of the HSL wheel. On the RGB wheel they have their own names:
30° — Orange (red + yellow) #FF8000
90° — Chartreuse (yellow + green) #80FF00
150° — Spring green (green + cyan) #00FF80
210° — Azure (cyan + blue) #0080FF
270° — Violet (blue + magenta) #8000FF
330° — Rose (magenta + red) #FF0080
These differ from the painter’s RYB tertiaries (red-orange, yellow-orange, and so on), which sit on a different wheel. “Orange” at 30° on the RGB wheel is not the same as “red-orange” in RYB.
Interfaces rarely use tertiaries at full saturation. Toned-down versions are far more common:
Teal (between spring green and cyan): #1ABC9C → rgb(26, 188, 156) → hsl(168, 76%, 42%)
Orange (adjusted): #E67E22 → rgb(230, 126, 34) → hsl(28, 80%, 52%)
Purple (violet, adjusted): #9B59B6 → rgb(155, 89, 182) → hsl(283, 39%, 53%)
The 12-Hue Color Wheel
Arranging primaries, secondaries, and tertiaries in HSL order gives a 12-step wheel:
| Hue | Name | Level | HEX |
|---|---|---|---|
| 0° | Red | Primary | #FF0000 |
| 30° | Orange | Tertiary | #FF8000 |
| 60° | Yellow | Secondary | #FFFF00 |
| 90° | Chartreuse | Tertiary | #80FF00 |
| 120° | Green | Primary | #00FF00 |
| 150° | Spring green | Tertiary | #00FF80 |
| 180° | Cyan | Secondary | #00FFFF |
| 210° | Azure | Tertiary | #0080FF |
| 240° | Blue | Primary | #0000FF |
| 270° | Violet | Tertiary | #8000FF |
| 300° | Magenta | Secondary | #FF00FF |
| 330° | Rose | Tertiary | #FF0080 |
Complementary pairs are 180° apart (6 steps), triadic sets 120° apart (4 steps), and analogous colors usually sit within 30–60° of each other (1–2 steps). The color harmony guide builds palettes from these angles.
Using the Three Levels Together
A structured palette assigns each level a job instead of picking hues at random. For example:
- Brand color from a primary region, such as a blue around
hsl(220, 80%, 50%), for identity and primary buttons - A secondary-region accent, such as a yellow near 50°, used sparingly for warnings and highlights
- A tertiary hue, such as a teal near 170°, for secondary actions, charts, or success states
Common Mistakes
- Using pure RGB primaries in UI. #FF0000, #00FF00, and #0000FF look harsh. Pull saturation down to 60–80% and adjust lightness.
- Confusing the RYB and RGB wheels. On the RYB wheel, red’s complement is green; on the RGB/HSL wheel it is cyan (180°). Pick one wheel and stay on it.
- Too many unrelated hues. Anchor a palette on one or two hues and derive the rest by adjusting saturation and lightness.
- Ignoring print. Pure RGB green and cyan are outside the CMYK gamut and print noticeably duller.
- Skipping contrast checks. Yellow (#FFFF00) text on white has a contrast ratio of about 1.07:1, effectively invisible.
Building a Palette From the Wheel
- Choose one base hue for the brand
- Create lighter and darker versions for backgrounds, cards, and headings by changing lightness
- Add one contrasting hue, from the opposite side of the wheel, for emphasis
- Add a tertiary hue for subtle accents or data visualization
Every color page on swatch.ing lists the complementary and other harmony colors for that hue; the color namer gets you there from any HEX, RGB, or HSL value.