Contents

Color handoff fails when developers receive swatches without exact values, accessibility context, or machine-readable token names. PaletteBench provides three browser-based tools—the color picker, palette generator, and contrast checker—that support documenting colors as design tokens rather than loose visual notes. This guide walks through what to capture from each tool, how to lock and export a four-color palette, how WCAG AA and AAA thresholds apply to normal and large text, and how to structure documentation across base palette, semantic token, and composition-rule layers. The result is a practical handoff path from color exploration to CSS custom properties or design-token files that designers, engineers, and accessibility reviewers can all reference during implementation.
Palette inputs and format outputs
What the color picker accepts
Users can choose a shade visually or enter a value directly. Once a value is supplied, HEX, RGB, and HSL stay in sync, so a change in any one representation updates the others. This synchronization is useful during handoff because a developer can record a single preferred format while knowing the equivalent values remain available.
Stable output facts
HEX supports short #RGB and full #RRGGBB forms. RGB accepts channel values from 0 through 255. HSL accepts hue from 0 through 360, with saturation and lightness from 0 through 100 percent. These ranges matter when documenting token values because a value outside the expected range may be invalid or normalized differently by CSS processors.
What to record for handoff
Capture the exact HEX value as the default reference, then record the equivalent RGB and HSL forms only if your token file or documentation system requires them. Do not assume that one format converts losslessly in every downstream tool; verify that your build pipeline preserves the values you document.
Planning questions
- Which color format does your design-token file expect as canonical?
- Will developers sample colors from design files, or should documentation provide the source of truth?
- How will you keep HEX, RGB, and HSL representations consistent after future shade adjustments?
Palette generation and token locking
Generating a harmonious starting palette
The palette generator produces four colors in one direction, ready for project use. Starting from a chosen color, the tool suggests related swatches that can serve as a base palette for design-system tokens.
How locking works
Locking any swatch preserves it through scheme changes and randomization. When a swatch is unlocked, it returns to exploration and may change as the scheme is adjusted. This distinction is important for documentation: locked swatches are the ones you should treat as candidate tokens, while unlocked swatches remain experimental.
Exporting four-color palettes
Once the desired swatches are locked, export the four-color palette for use in design-system token files. Record which swatches were locked at export time so future reviewers understand which values were intentional and which were exploratory.
Planning questions
- Did you lock brand-critical swatches before generating alternative schemes?
- Is the exported palette stored with a version identifier or date?
- Which team member approves locked swatches before they become tokens?
Contrast checking and WCAG thresholds
How the contrast checker works
Users enter text color and background color as HEX values to read the contrast result. The tool evaluates the pairing and reports whether it meets applicable WCAG thresholds.
WCAG ratio thresholds
WCAG distinguishes normal text from large text at both AA and AAA levels. Normal text generally requires a 4.5:1 contrast ratio for AA and 7:1 for AAA. Large text has lower thresholds, typically 3:1 for AA and 4.5:1 for AAA, though exact definitions of "large text" should be verified against the current WCAG specification because size criteria depend on font weight and point size.
Recording results for QA
Document each text/background pairing with its measured ratio, the WCAG level it passes or fails, and the intended context. For example, white text on #4338CA measures 7.90:1 and passes normal-text AA and AAA. That pairing could be documented as an approved combination for primary action buttons or prominent headings.
Internal format handling
All color values are internally converted to sRGB for WCAG contrast checking while the original format is preserved for display and export. This means developers can document tokens in their preferred CSS format without changing how contrast is evaluated, but they should still verify contrast using the actual rendered colors, not only the documented string.
Planning questions
- Which text sizes in your product count as large text under WCAG?
- Are contrast results recorded per component state, such as hover, focus, and disabled?
- Who reviews failed pairings before implementation begins?
Design token storage formats
Supported CSS color strings
Valid CSS color strings include hex (#RGB, #RGBA, #RRGGBB, #RRGGBBAA), named colors, functional rgb/rgba/hsl/hsla/hwb, wide-gamut oklch/oklab/lch/lab, and color-mix. Hex #RRGGBB is the recommended default for design-token documentation because it is widely supported and easy to audit.
YAML token structures
Document colors as machine-readable design tokens using a YAML-style structure. Each token should carry a name, a value, and optional metadata such as description, intended use, and contrast status. Avoid inventing schema fields not supported by your token pipeline; verify the exact structure before committing files to version control.
Token reference syntax
Use token references consistently so that components consume semantic names rather than raw color values. This makes future updates easier: changing a base color updates every component that references the semantic token.
What to annotate
Annotate behavior and edge cases rather than appearance values that developers can already sample from the design file. Examples include hover states, focus indicators, dark-mode variants, and disabled opacity. This keeps documentation focused on decisions developers cannot infer visually.
Planning questions
- Does your token pipeline accept YAML, JSON, or both?
- Is #RRGGBB the canonical format, or are alpha values required?
- Which token names will components import directly?
Three-layer color documentation model
Layer 1: Base palette
The base palette documents raw colors by what they are, using names such as blue-500. These are the locked swatches exported from the palette generator, recorded with their HEX, RGB, and HSL equivalents.
Layer 2: Semantic tokens
Semantic token names describe what the color does, such as action-primary, rather than what it is. Semantic naming is self-documenting and helps developers understand intent without sampling design files. Each semantic token should map to a base palette color and carry metadata for intended contexts.
Layer 3: Composition rules
Layer 3 documents how tokens combine, such as action-primary on surface-default always meets WCAG AA 4.5:1. These rules serve QA and accessibility reviewers by defining approved pairings and their contrast status. Composition rules should link semantic tokens to contrast constraints and intended contexts, not merely list available colors.
Who each layer serves
Designers consult the base palette for visual consistency. Engineers consume semantic tokens in CSS custom properties or token files. Accessibility reviewers validate composition rules against WCAG thresholds. Keeping the layers separate prevents confusion about which document governs which decision.
Planning questions
- Which semantic names match your component vocabulary?
- Are composition rules reviewed by an accessibility specialist before release?
- Where does each layer live so the right audience finds it without hunting?
Developer handoff checklist
From PaletteBench outputs to documented tokens
- Open the color picker and record the canonical HEX value for each base color, with RGB and HSL equivalents if your pipeline requires them.
- Use the palette generator to create a four-color palette, lock swatches that should survive scheme changes, and export the result.
- Run each intended text/background pairing through the contrast checker using HEX values and record the ratio, WCAG level, and pass/fail status.
- Create base-palette tokens using blue-500-style names for raw colors.
- Create semantic tokens using action-primary-style names that describe function, mapped to base tokens.
- Document composition rules that pair semantic tokens with backgrounds and record WCAG AA or AAA status.
- Export tokens to CSS custom properties or your design-token file using #RRGGBB as the default format unless alpha or wide-gamut values are required.
- Annotate behavior and edge cases, such as hover, focus, dark mode, and disabled states, rather than duplicating appearance values.
- Publish documentation where developers consult it during implementation, not after, such as a component library site, token repository, or internal design-system portal.
- Schedule a review with designers, engineers, and accessibility reviewers before the token set is marked final.
Where documentation should live
Color documentation should live alongside implementation artifacts so developers consult it while building. Options include a design-system website, a token repository linked from component documentation, or an internal portal connected to the component library. The exact location is less important than accessibility during development.
Final verification
Before handoff, confirm that every exported token has a corresponding contrast result where text is involved, that locked swatches match documented base tokens, and that semantic names are used consistently in component code.

