Contents

Documenting system colors means recording deliberate palette decisions so a team can reuse them consistently instead of picking shades by eye each time. A lightweight design system does not need complex infrastructure; it needs reliable color values, accessible pairings, and a clear way to translate those decisions into code. This article walks through a practical workflow using browser-based tools: selecting a base color, generating a four-color harmony, checking contrast against WCAG thresholds, and documenting verified pairs as CSS custom properties. All steps focus on inputs, outputs, and decisions you can make in the tools themselves, without assuming capabilities that are not present on the source page.
Why document system colors
Ad-hoc color choices create maintenance problems. When designers and developers pick shades independently, the same brand blue can appear in several subtly different forms across headers, buttons, and footers. Documenting colors as custom properties centralizes those decisions in one place. If a base shade changes, updating a single token propagates the change everywhere it is used.
Recording palette decisions also supports accessibility. Contrast is not a one-time visual check; it is a property of a specific text-and-background pair. By documenting verified pairs, a team avoids shipping combinations that fail WCAG thresholds for normal or large text. The documentation becomes a reference for new team members and a checkpoint during design reviews.
A lightweight system does not require a dedicated design-token server. CSS custom properties can live in a stylesheet and be consumed directly by components. The key steps are choosing a base color, building a harmony, verifying contrast, and declaring the results as named tokens. The sections that follow explain each step using the color picker, palette generator, and contrast checker.
What to expect from this workflow
You will start with one shade, generate four related colors, test text and background combinations against WCAG AA and AAA levels, and turn passing pairs into CSS custom properties. The tools are browser-based and do not require uploads, which keeps the workflow quick and repeatable.
Questions to answer before starting
- Which base color represents your brand or primary UI tone?
- Which harmony type fits the interface structure: complementary, analogous, triadic, or tetradic?
- Which text sizes will appear in your system, since large text has different contrast thresholds?
- Where will the CSS custom properties be declared so components can consume them?
Pick one base color
Begin by choosing a single shade that will anchor the palette. In the color picker, you can choose a shade visually or enter a value. The tool displays HEX, RGB, and HSL values for the selected color, and these values stay in sync as you adjust the shade.
The picker supports several input formats:
- HEX in short or long form: #RGB or #RRGGBB
- RGB with each channel from 0 to 255
- HSL with hue from 0 to 360 and saturation and lightness from 0 to 100%
When you change one format, the others update automatically. This synchronization is useful for handoff because developers can copy the format that matches their codebase while designers can work in the format that matches their design tool.
The page example shows a selected color of #4338CA with a live preview and copy functionality. You can use this as a reference point or replace it with your own brand shade. Copying the value lets you carry it into the palette generator or contrast checker without retyping.
Practical decision
If your brand already has a primary color, enter it directly. If you are exploring, start with a visually chosen shade and note its HEX, RGB, and HSL outputs before moving to harmony generation. Recording the base color first ensures you can return to it if later experiments drift too far from the intended tone.
What to verify
- Does the entered value match the intended brand shade?
- Are all three output formats available for copying?
- Does the live preview match the color you expect in your interface context?
Build a four-color harmony
Once you have a base color, the palette generator creates related shades. It offers four harmony options starting from a color: Complementary, Analogous, Triadic, and Tetradic. You can send the selected color from the picker into the generator, or randomize the starting point to explore from scratch.
A generated palette contains four colors in one direction. This size is practical for a lightweight system because it gives you enough variation for primary, secondary, accent, and neutral roles without creating an unwieldy number of tokens.
Locking a swatch preserves it through scheme changes and randomization. If you like one color in the generated set, lock it before changing the harmony type or randomizing again. Unlocking returns that swatch to exploration, allowing it to shift with future changes. This behavior helps you protect brand-critical colors while experimenting with supporting shades.
Workflow steps
- Start with your base color from the picker.
- Choose a harmony type: Complementary, Analogous, Triadic, or Tetradic.
- Review the four generated colors.
- Lock any swatch you want to keep.
- Change harmony type or randomize if needed, knowing locked colors remain fixed.
- Prepare the final four colors for export or manual documentation.
Decisions to document
- Which harmony type you selected and why
- Which swatches were locked
- The HEX values for all four colors
- How each color maps to a UI role, such as primary button, secondary button, accent border, or background
What remains unspecified
The source page does not describe export file formats or a built-in export button. Treat export as a manual step: copy each HEX value and record it in your design-system documentation or stylesheet. If you need a specific export format, verify whether the tool provides it before planning your workflow around it.
Check contrast against WCAG thresholds
After generating a palette, test text and background pairings before documenting them. In the contrast checker, you enter a text color HEX and a background color HEX to test a pairing. The tool evaluates the combination against WCAG thresholds.
The exact thresholds are:
- Normal text: 4.5:1 for AA, 7:1 for AAA
- Large text: 3:1 for AA, 4.5:1 for AAA
Large text is defined as 18 pt or 14 pt bold. Because thresholds differ by text size, you should know which sizes your system uses before declaring a pair accessible. A combination that passes for large headings may fail for body copy.
The page example shows white text on #4338CA measuring 7.90:1, which passes normal-text AA and AAA. This demonstrates how to interpret a passing result, but you should test your own pairs rather than assuming this example applies to your palette.
The contrast checker includes a sample of everyday text using the selected colors, including pairings that fail, while results remain readable. You can select and copy the checker output for documentation. Use this output to record which pairs passed and at which level.
Elements beyond body text to check
Contrast is not only about paragraphs. Readers should also check focus indicators, labels, and visual cues beyond color. Icons, controls, and other non-text elements may also need contrast testing as part of a broader testing strategy. If your system includes small interface text, captions, or disabled states, test those separately because they may fall under normal-text requirements.
Planning advice when information is missing
The source page does not state whether the checker saves results automatically or how long output remains available. Copy or record results immediately after testing. It also does not specify whether non-text contrast thresholds beyond the listed WCAG ratios are shown. Verify any additional requirements against the current WCAG documentation before finalizing your system.
Document pairs as CSS custom properties
Once a color pair passes the contrast test, declare it as a CSS custom property so components can use it consistently. A lab article explains using PaletteBench’s color picker, palette generator, and contrast checker to find accessible pairs, then declare them as CSS custom properties.
A typical declaration might look like this:
–color-primary-text: #ffffff;
–color-primary-background: #4338CA;
Custom properties allow you to change a value in one place and update every component that references it. They also make the accessibility decision visible in code: the property name can reflect the verified pairing, such as –color-primary-on-background, rather than hiding the relationship in a component file.
Steps for implementation
- Copy the passing text and background HEX values from the contrast checker.
- Choose custom-property names that describe the role, not just the shade.
- Declare the properties at the component or global scope where they will be consumed.
- Apply the properties to text and background styles in your components.
- Record the WCAG level each pair passed alongside the token, if your documentation system supports annotations.
What to include in documentation
- The custom-property name
- The text color value
- The background color value
- The WCAG level passed (AA or AAA) and text size category
- The date verified, since thresholds or tool behavior could change
Missing information to verify
The source page does not describe a built-in save or export feature for CSS custom properties. Treat the transfer from checker output to stylesheet as a manual step. If you expect the tool to generate CSS automatically, verify whether that capability exists before relying on it.
Practical palette examples
This section outlines example workflows for common design-system needs. A lab article covers generating a monochromatic palette starting from one hue and adjusting saturation and brightness for header, footer, and buttons. Another lab article explains triadic and tetradic palettes with practical workflows for real-world UI states.
Example 1: Monochromatic header, footer, and button palette
Start with one hue and vary saturation and brightness to create related shades. For example:
- Header background: a darker shade of the base hue
- Footer background: a lighter shade of the base hue
- Buttons: the base hue or a mid-tone with sufficient contrast against the button text
Test each button text-and-background pair in the contrast checker before documenting it. If the base hue does not pass against white text at the required level, adjust lightness or choose a different text color.
Example 2: Triadic or tetradic UI state system
Use triadic or tetradic harmony to generate four colors for UI states:
- Default state
- Hover or active state
- Success or confirmation state
- Error or alert state
Lock the base color first so it stays fixed while you explore harmony options. Then test state indicators against their backgrounds. Small status text or icons may need separate contrast checks because they are not large text.
Moving from tool output to documented tokens
- Generate the harmony and note the four HEX values.
- Map each color to a UI role.
- Test role pairings in the contrast checker.
- Copy passing pairs into CSS custom properties.
- Add notes about which WCAG level each pair passed.
What to verify for your project
- Whether the harmony output matches your visual expectations in the actual interface
- Whether small UI text meets normal-text thresholds
- Whether focus states and labels are checked in addition to color contrast
- Whether your documentation process records the verification evidence for each token