Sub topic 4
Working with the brand color palette
This chapter assumes you have read how a guideline document is organized and can find its color section. It also assumes you know basic color models (RGB, CMYK, HEX). The goal is to apply the palette the way the guideline intends, not just copy swatches.
How a brand palette is structured
Most guidelines split color into tiers, and each tier has a job.
| Tier | Purpose | Typical share of a layout |
|---|---|---|
| Primary | Carries the brand identity: headings, main buttons, key surfaces | Largest brand-colored area |
| Secondary | Supports the primary: panels, charts, section dividers | Moderate |
| Accent | Draws the eye to one thing: a highlight, a call to action | Small |
| Neutrals | Text, backgrounds, borders | Most of the page |
Each color usually comes with values for several color models. A guideline might list HEX and RGB for screens, CMYK for process printing, and a Pantone spot color for print jobs that need exact matching. Use the value for your output medium. Do not convert between models yourself, because automatic RGB-to-CMYK conversion shifts saturated colors, and the guideline's listed values were chosen to avoid that.
Applying roles, not just swatches
Read the usage notes next to each color. They state roles, such as "main brand blue, for headings and primary buttons" or "highlights only, not body text." Following the role matters more than matching the hex code. A correct accent color used for paragraphs is still a misuse.
Define each value once and reference it by name. This keeps pages from drifting toward "close enough" copies.
:root {
--brand-color-primary: #0b3d91;
--brand-color-accent: #f2a900;
--brand-color-text: #1a1a1a;
--brand-color-background: #ffffff;
}
h1 {
color: var(--brand-color-primary);
}
body {
color: var(--brand-color-text);
background: var(--brand-color-background);
}Tints, shades, and proportion
Guidelines often allow tints (the color mixed with white) in set steps such as 80%, 60%, and 20%. If the document lists no tints, do not invent them. Ask or treat it as a gap, which a later chapter covers. Also respect proportion rules. A palette where the accent covers half the layout reads as a different brand even if every hex code is correct.
Common errors
- Sampling from a logo file or screenshot. Compression and color profiles change the values. Use the guideline's numbers.
- Using the print value on screen, or the reverse. Match the value to the medium.
- Accent as text color. With the example palette, the amber accent (#f2a900) on white has a contrast ratio of about 2:1, well below the 4.5:1 that WCAG AA requires for normal text. The primary blue on white is about 10:1.
- Adding a "similar" color. A new blue next to the brand blue looks like a mistake, not a variation.
- Ignoring dark backgrounds. Check whether the guideline has an approved reversed or dark-mode pairing before placing colors on dark surfaces.
Checking a pair quickly
You can compute contrast instead of eyeballing it.
function channel(value) {
const s = value / 255;
return s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
}
function luminance([r, g, b]) {
return 0.2126 * channel(r) + 0.7152 * channel(g) + 0.0722 * channel(b);
}
function contrastRatio(rgbA, rgbB) {
const [light, dark] = [luminance(rgbA), luminance(rgbB)].sort((a, b) => b - a);
return (light + 0.05) / (dark + 0.05);
}
console.log(contrastRatio([11, 61, 145], [255, 255, 255]).toFixed(1)); // about 10.1
console.log(contrastRatio([242, 169, 0], [255, 255, 255]).toFixed(1)); // about 2.0Exercise
Your layout needs a small caption in the amber accent (#f2a900) on a white background, and the guideline says the accent is for highlights only. What do you do, and why?
Show answer
Do not set the caption in the accent color. The accent on white has about 2:1 contrast, which fails the 4.5:1 AA threshold for normal text, and the usage note also forbids it for text. Set the caption in the brand text color (or primary blue) and use the accent as a small highlight element, such as an underline or a marker beside the caption.