Analytics cookies
We use optional Google Analytics to understand which tools are useful and improve the site. Analytics stays off unless you accept. Privacy Policy
Give your website a coherent color system. Edit a palette, check text and UI contrast, try the colors in a live layout, then export WordPress theme.json or CSS variables.
Opaque sRGB HEX only. Names can change; export slugs stay fixed. Assign each preview role once.
primarysecondaryaccentbackgroundsurfacetextmutedChanges are saved in this browser. Reset restores Coastal blue.
A place for your next idea
Give every color a purpose. Keep the reading comfortable, and let the important actions stand out.
A card with surface, text and muted roles.
Accent marks this notice. Check its contrast against the surface.
Use the sample controls to explore your colors.
Button text uses Background. Missing preview roles use Coastal blue defaults; exports contain your palette only.
Text on Background: 17.06:1. Normal text AA passes.
Large text: at least 24 CSS px regular or about 18.67 px bold. UI checks apply to meaningful boundaries and graphics against adjacent colors; there is no separate AAA UI threshold. Ratios display rounded down; checks use full precision.
theme.json v3 · WordPress 6.6+. Merge settings.color.palette into your existing file; keep its other settings and styles.
{
"$schema": "https://schemas.wp.org/wp/6.6/theme.json",
"version": 3,
"settings": {
"color": {
"palette": [
{
"name": "Primary",
"slug": "primary",
"color": "#1D4ED8"
},
{
"name": "Secondary",
"slug": "secondary",
"color": "#0F766E"
},
{
"name": "Accent",
"slug": "accent",
"color": "#B45309"
},
{
"name": "Background",
"slug": "background",
"color": "#F8FAFC"
},
{
"name": "Surface",
"slug": "surface",
"color": "#FFFFFF"
},
{
"name": "Text",
"slug": "text",
"color": "#0F172A"
},
{
"name": "Muted",
"slug": "muted",
"color": "#475569"
}
]
}
}
}
Ready to copy or download.
Complete the system with WordPress Spacing System Generator, or merge your colors with other settings in the WordPress theme.json Generator.
This is useful for block-theme starters, client brand systems and checking a redesign before editing templates. The preview includes navigation, buttons, a card, a notice and a text field. Its controls work locally, so you can inspect states while you design.
The checker converts opaque sRGB colors to relative luminance, then divides the lighter luminance plus 0.05 by the darker luminance plus 0.05. Ratios range from 1:1 to 21:1. It uses the full ratio for decisions and rounds the displayed number down to avoid showing a failing pair as a pass.
WCAG AA requires 4.5:1 for normal text and 3:1 for large text. AAA raises those thresholds to 7:1 and 4.5:1 respectively. Large text means at least 18 pt (24 CSS px), or 14 pt (about 18.67 CSS px) when bold. See W3C’s minimum contrast guidance and enhanced contrast guidance.
The 3:1 AA check for non-text contrast concerns visual information needed to identify controls, states and meaningful graphics against adjacent colors. A button’s label still needs its own text check. These pair results do not certify a whole site: keyboard access, focus, semantics, text size, images and other requirements need separate review.
White #FFFFFF on Coastal blue’s Primary #1D4ED8 has a contrast ratio of 6.70:1. It passes normal-text AA. Choose Surface as foreground and Primary as background to inspect that pair; then check Primary against Background for its surrounding boundary. Test muted text on both Background and Surface as a separate step.
The export follows WordPress theme.json version 3, supported from WordPress 6.6. It pins the 6.6 schema because these palette fields need no newer features. Each entry under settings.color.palette contains a human-readable name, a stable slug and an opaque HEX color.
In your existing theme.json, merge the palette array into settings.color. Preserve other settings, styles and metadata, and check for slug collisions with colors already used by your theme. Keep the version-specific schema appropriate for your theme. Back up the file and test in a child theme or development site before changing the live theme.
/* WordPress creates this variable from the primary slug. */
.call-to-action {
background: var(--wp--preset--color--primary);
}Color presets become available to supported editor color controls; this palette export does not assign global or block styles. Set those separately in the WordPress theme.json Generator. Preview roles belong to this tool and do not automatically style WordPress buttons or blocks.
Choose CSS variables to generate a :root block with properties such as --color-primary and --color-background. Paste it into your stylesheet and use var(--color-primary) where you need it. This export works independently of WordPress.
The default seven colors have stable role-based slugs. Added colors get a unique slug such as color-8. Renaming a color or changing its preview role keeps its slug stable, so references do not silently change.
This tool accepts opaque three- or six-digit sRGB HEX colors only. Alpha, gradients and wide-gamut values need additional compositing and are not accepted. Check the actual background behind text when using those elsewhere.
WordPress combines defaults, theme settings and user customizations. Existing Site Editor choices can take priority over theme styles, and individual blocks may have their own colors. Test the result in the editor and on the front end instead of assuming a file change restyles every block.
The most recent valid palette is saved in local storage in this browser, independently of analytics consent. It is not synced between devices. Reset replaces it with Coastal blue. Clear this site’s browser data to remove it entirely. If storage is blocked, the tool still works and tells you to export before leaving.
The ratio measures a pair of solid colors. Small or thin fonts, image backgrounds, overlays and surrounding content can change practical readability. Check real components in their actual states and context as well.