Sub topic 4
Working with the brand color palette
This chapter assumes you can use a design tool, know the difference between RGB, CMYK, and spot color models, and have read the earlier chapters on how a guideline document is organized. By the end, you should be able to read a palette section, apply it with the right proportions and values in each medium, and check your pairings for contrast before review.
What a palette section actually specifies
A brand palette is more than a row of swatches. A complete palette section settles several separate decisions.
- Roles. Which colors are primary, secondary, accent, and neutral.
- Values per medium. The same color has different codes for screen, print, and sometimes paint or textiles.
- Proportions. How much of a layout each color should cover.
- Permitted combinations. Which text and background pairs are approved, and which are banned.
- Usage notes. Rules such as "accent for highlights only."
| Color role | Typical job | Typical limit |
|---|---|---|
| Primary | Headings, primary buttons, logo | Dominant color in most layouts |
| Secondary | Supporting panels, charts, illustration | Used with primary, rarely alone |
| Accent | Calls to action, highlights, emphasis | Small areas only, not body text |
| Neutral | Text, backgrounds, borders, dividers | Carries most of the page area |
Read the usage notes before you read the values. A hex code tells you what a color is. The note tells you where it is allowed.
Color values across media
A guideline usually lists several codes for one color. Use the code that matches your output, and do not convert it yourself unless the document tells you to.
| Value type | Used for | Notes |
|---|---|---|
| HEX / RGB | Web, apps, presentations, video | Screen output, additive color |
| CMYK | Process printing | Conversions can shift appearance |
| Pantone (spot) | Print runs needing exact match | Often used for logos and packaging |
| HSL or tokens | Design systems | Derived from the source values |
Guidelines list these values separately because conversions between models are not exact. A saturated blue on screen often falls outside what CMYK ink can reproduce, so the printed version looks duller. If the guideline lists a CMYK value, it was chosen or tested for that reason. Use it.
When you are unsure which value to use, ask what the final output is. A PDF for screen reading uses RGB. A brochure sent to a commercial printer uses CMYK or spot values. Presentation files used on a projector use RGB.
Proportion and hierarchy
Many guidelines give a rough ratio, for example 60% neutral, 30% primary, 10% accent. Treat it as a balance guide rather than a measurement. The practical effect is that the accent color keeps its power only if it is scarce. A page with accent-colored headings, buttons, icons, and borders has no emphasis left.
Use this order of decisions:
- Start with the neutral background and text colors.
- Add the primary color for structure: headings, key shapes, main buttons.
- Add secondary colors for grouping or data.
- Place the accent last, on the one or two things the viewer must notice.
Tints, shades, and transparency
Designers often need a lighter or darker version of a brand color, for example a pale blue panel behind text. Whether this is allowed depends on the guideline.
- If the guideline lists tints (such as 80%, 60%, 40%), use those exact steps.
- If it lists none, treat tinting as a gap, not a permission. Chapter 12 covers how to handle gaps.
- Do not use opacity as a shortcut. A 50% opacity color over a photo is not a single color, and it changes with whatever sits behind it.
- Do not shift hue to "warm up" or "cool down" a brand color. A slightly different blue is a different color, not a variation.
A common failure is eyedropping a color from a screenshot or an old file. Compression, color profiles, and prior edits mean the sampled value is often a few steps off. Always copy values from the guideline or from the official swatch library.
Gradients, charts, and illustration
Gradients are permitted only when the guideline defines them. A gradient between two palette colors is still a new treatment, and some brands ban it. Check for a "gradients" or "color effects" note.
Data visualization is where palettes break most often. A brand might have four colors, and a chart needs eight series. Look first for an extended data palette. If none exists, you have several options:
- Use the secondary colors in a fixed order and add direct labels, so color is not the only way to identify a series.
- Vary line style, pattern, or marker shape alongside color.
- Group small series into "Other" in a neutral gray.
Do not invent new hues to fill the gap. Record your approach and send it for approval, as covered in the review chapter.
Checking contrast with code
Brand teams approve palettes in isolation, but accessibility depends on pairs. The WCAG AA threshold is a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text and meaningful interface elements. The formula uses relative luminance. This script reads hex codes from the example brand and reports the result for several pairs.
function hexToRgb(hex) {
const n = parseInt(hex.slice(1), 16);
return [(n >> 16) & 255, (n >> 8) & 255, n & 255];
}
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(hexA, hexB) {
const [light, dark] = [luminance(hexToRgb(hexA)), luminance(hexToRgb(hexB))]
.sort((a, b) => b - a);
return (light + 0.05) / (dark + 0.05);
}
const pairs = [
{ name: "Primary on white", fg: "#0b3d91", bg: "#ffffff" },
{ name: "Text on white", fg: "#1a1a1a", bg: "#ffffff" },
{ name: "Accent on white", fg: "#f2a900", bg: "#ffffff" },
{ name: "Accent on primary", fg: "#f2a900", bg: "#0b3d91" },
];
for (const pair of pairs) {
const ratio = contrastRatio(pair.fg, pair.bg);
const normal = ratio >= 4.5 ? "pass" : "fail";
const large = ratio >= 3 ? "pass" : "fail";
console.log(`${pair.name}: ${ratio.toFixed(2)}:1, normal text ${normal}, large text ${large}`);
}Running it gives roughly 10:1 for primary on white, 17:1 for text on white, 2:1 for accent on white, and 5:1 for accent on primary. The result is useful. The accent color fails on white even for large text, which matches the guideline note "highlights only, not body text." The same accent passes on the primary blue, so a button or banner with accent text on a blue field is an approved route. The numbers back up the usage rule.
Encoding the palette in code
Once you know which pairs are valid, make them the easy choice. Name custom properties by role, not by appearance, so a change to the brand value updates every use.
:root {
--brand-color-primary: #0b3d91;
--brand-color-accent: #f2a900;
--brand-color-text: #1a1a1a;
--brand-color-background: #ffffff;
}
.button-primary {
background: var(--brand-color-primary);
color: var(--brand-color-accent);
}
.highlight-tag {
background: var(--brand-color-accent);
color: var(--brand-color-text);
}Both pairs are valid: accent text on primary is about 5:1. Dark text on the accent background has a ratio of about 8:1, so it passes too. A name such as --blue-1 would hide the role and invite misuse. Chapter 11 develops this into full design tokens.
Common errors
- Sampling colors from screenshots. Fix: copy values from the swatch library.
- Using RGB values in a print file. Fix: set the document color mode first, then pick swatches.
- Overusing the accent. Fix: count accent areas on a page, and keep them to one or two.
- Relying on color alone. Fix: add labels, icons, or patterns so the meaning survives grayscale and color-blindness.
- Ignoring dark mode. Fix: check whether the guideline defines dark-surface pairs. If not, treat it as a gap.
- Approving by eye. Monitors differ. Compute the ratio.
Exercise
A guideline defines primary #0b3d91, accent #f2a900, and white #ffffff. Your banner design uses accent-colored 16px body text on a white background. Using the contrast results in this chapter, state whether it passes WCAG AA, name one approved fix that keeps the brand colors, and explain which guideline note supports the fix.
Show answer
It fails. Accent on white is about 2:1, below the 4.5:1 minimum for normal text and below 3:1 for large text. Fix it by putting the text in the dark neutral #1a1a1a on white (about 17:1), or by placing the accent text on the primary blue (about 5:1). The guideline note "Highlights only. Do not use for body text" supports moving body text to the neutral. Accent text on primary passes contrast, but it should stay short, such as a button label, to respect that note.