Product update
A calm interface after sunset
Semantic roles stay recognizable while luminance shifts for a darker canvas.
View detailsRuns entirely in your browser - no upload, no sign-up.
Semantic conversion
Product update
Semantic roles stay recognizable while luminance shifts for a darker canvas.
View detailsProduct update
Semantic roles stay recognizable while luminance shifts for a darker canvas.
View detailsCopy-ready roles
:root {
--background: #ffffff;
--surface: #f8fafc;
--text: #172033;
--accent: #635bff;
}
@media (prefers-color-scheme: dark) {
:root {
--background: #121212;
--surface: #1c2227;
--text: #eeeff2;
--accent: #6c65f5;
}
}This converter supplies deterministic starting points for opaque sRGB colors. Review the complete interface in context, including hover, focus, disabled, error, and image states.
A dark mode color converter maps the semantic colors in a light interface to darker background and surface values, lighter text, and a visible accent. This tool preserves color relationships where practical, checks the important pairs for luminance contrast, and exports both themes as CSS variables.
Add hex values for the page background, card surface, body text, and accent color, or use the example palette.
Compare the same interface in both themes and review the text, accent, and surface contrast readings.
Copy individual generated colors or export the complete light and dark CSS variable block.
prefers-color-scheme.Dark mode is not a photographic negative. Direct inversion can turn brand accents harsh, flatten the difference between a page and its cards, and leave text pairs unreadable. This converter treats each input as a semantic role, then adapts its luminance for a dark canvas while retaining its hue character.
The result is a transparent starting point, not an accessibility certificate. Exact ratios are shown for the generated pairs, and every calculation runs locally in your browser.
Yes. Enter the four semantic roles from your light interface and the converter produces deterministic dark candidates. It preserves hue where useful, compresses backgrounds into a dark luminance range, and adjusts text and accent lightness to meet the displayed contrast targets.
Raw inversion ignores what each color does. A page background, card surface, paragraph, and brand accent need different treatment. Inversion can make accents too bright, reduce surface hierarchy, and change familiar brand relationships. Semantic conversion adapts each role separately.
WCAG Level AA requires at least 4.5:1 for normal text and 3:1 for large text. Level AAA raises normal text to 7:1. These ratios apply equally to light and dark themes and are based on relative luminance, not the names of the colors.
No. It checks the generated opaque sRGB pairs shown in the result, but accessibility also depends on component states, focus indicators, typography, images, overlays, color blindness, zoom, and whether color alone communicates meaning. Test the complete interface before release.
Yes. The CSS export defines the original values on <code>:root</code> and places the converted values inside <code>@media (prefers-color-scheme: dark)</code>. You can rename the variables or move the dark block under a class or data attribute if your theme uses a manual switch.
No. Hex parsing, HSL adaptation, contrast calculations, previews, and CSS generation all run in your browser. The tool does not upload your palette or require an account.