Social media thumbnail

Accessible Color Palette Generator

Background: This tool helps design accessible UI color palettes that work consistently in both light and dark modes.
It builds on the token-based, demo-first approach introduced by Frances Wu, and extends it with automation, contrast checking, and AI-assisted exploration. Human review is always required.

Usage and Contribution: Generate palettes from a seed color, override tokens, and review WCAG 2.2 and APCA contrast results directly in the interface. This project is open source. Please report issues or contribute improvements on GitHub.

Palette

The Palette shows a single set of semantic color tokens rendered in light and dark modes.
Both palettes share the same token IDs. Theme differences are controlled by the parent container using data-theme-mode, allowing consistent overrides and comparisons, including alignment with systems like USWDS.

Light palette values

Each swatch below reflects the light token for its ID.

Canvas
N/A
Card
N/A
Accent Non-Content Baseline
N/A
Accent Non-Content Soft
N/A
Accent Non-Content Subdued
N/A
Accent Non-Content Strong
N/A
Neutral Non-Content Soft
N/A
Neutral Non-Content Subdued
N/A
Neutral Non-Content Strong
N/A
Accent Content Baseline
N/A
Accent Content Subdued
N/A
Accent Content Strong
N/A
Neutral Content Subdued
N/A
Neutral Content Strong
N/A

Dark palette values

This mirrored column uses the dark theme parent.

Canvas
N/A
Card
N/A
Accent Non-Content Baseline
N/A
Accent Non-Content Soft
N/A
Accent Non-Content Subdued
N/A
Accent Non-Content Strong
N/A
Neutral Non-Content Soft
N/A
Neutral Non-Content Subdued
N/A
Neutral Non-Content Strong
N/A
Accent Content Baseline
N/A
Accent Content Subdued
N/A
Accent Content Strong
N/A
Neutral Content Subdued
N/A
Neutral Content Strong
N/A

Demo

The Demo uses identical UI markup for light and dark modes.
Visual differences exist only because the palette values change. This makes it easier to see how tokens behave in real components, including focus and non-text elements.

Light UI sample

This column renders every element against the light palette.

Generic female avatar
Jane I.S. Awesome
jane.is.awesome@example.com
Helpful error message

Or

Task failed successfully.

Edit this text to test your contrast and readability.

  • Check list item colors
  • Check focus rings
info Please upgrade to the new version.
Fully-featured Open source
Alice Bob Charlie Dave Eve
V BG group group

Dark UI sample

Same DOM, dark tokens.

Generic female avatar
Jane I.S. Awesome
jane.is.awesome@example.com
Helpful error message

Or

Task failed successfully.

Edit this text to test your contrast and readability.

  • Check list item colors
  • Check focus rings
info Please upgrade to the new version.
Fully-featured Open source
Alice Bob Charlie Dave Eve
V BG group group

Share or reuse this palette

Export every generated token (light and dark) as a CSV or Penpot-native JSON, or import a supported file to replace the current palette. Each row documents the theme, token ID, functional category, and hex value.

Export current palette

Download a CSV, export a Penpot native token JSON (DTCG style), or copy the CSS variables for both themes.

Import a palette

Select a CSV or Penpot-compatible JSON file generated by this tool to override the swatches below.

CSV columns (quoted where needed): theme, color, token, role, category, usage

  • theme: light or dark
  • token: swatch ID such as accentContentStrong
  • category: dominant, accent, neutral, or background
  • usage: short hint like canvas, card, subdued, etc.
  • color: hex value (e.g. #336699)

JSON export follows the Penpot native tokens / DTCG model, including $themes, $metadata.tokenSetOrder, and theme-specific token sets keyed by the palette name and mode. Imported JSON should present tokens with IDs that match the swatches shown above.

Amplify

Share this tool

Highlight the Accessible Color Palette Generator for your professional network. Open a LinkedIn, Bluesky, or Mastodon composer to post the headline and link below.