prefers‑color‑scheme Live Preview - Online Dark/Light
Toggle between light and dark mode for a demo page. See how to use the media query. Copy the pattern.
UD5 Toolkit
Adjust Lightness & Chroma in OKLCH color space — live preview & CSS code
| L ↓ / C → | C=0.05 | C=0.12 | C=0.20 | C=0.30 | C=0.40 |
|---|
from keyword, you can reference a base color and adjust channels like lightness, chroma, or hue — without manually calculating new color values. Example: oklch(from #6366f1 0.8 c h) takes the base color's chroma (c) and hue (h), but sets lightness to 0.8.
calc() inside relative color functions to adjust channels dynamically. For example, oklch(from var(--base) calc(l + 0.1) c h) increases lightness by 0.1. Or oklch(from var(--base) l calc(c * 0.5) h) halves the chroma, creating a desaturated variant. This is powerful for generating hover states, disabled states, or entire color scales from a single base token.
oklch(from var(--base) l c calc(h + 60)) to shift hue by 60 degrees. This creates harmonious color schemes like analogous or complementary palettes directly in CSS — no preprocessor needed.
Toggle between light and dark mode for a demo page. See how to use the media query. Copy the pattern.
Simulate forced‑colors mode and see how your site looks. Adjust CSS system colors. Make your design accessible.
Define a set of colors for light and dark themes. Get the CSS custom properties snippet. Toggle live.
Highlight elements with aria‑describedby and see the linked description text. Verify a11y annotations.
Generate a palette of N colors that are maximally distinguishable for common color vision deficiencies. Copy the hex codes.
Beautify and format your CSS stylesheets instantly. Organize, minify, or prettify CSS code for better readability. Processed securely on client-side.
Enter a URL and see a visual map of the tab order. Detect broken tabindex values. Improve keyboard navigation.
See how a full paragraph looks with your chosen text and background colors. Not just a ratio; the real appearance.
Stack multiple background images and blend them with colors. Create unique textures. Copy the CSS code instantly.
Design a realistic neon sign text with multiple layers of glow. Copy the CSS and HTML. Perfect for headers.
Visualize how caffeine decays in your body over time. Enter intake amount and see remaining caffeine at bedtime to optimize sleep. Uses standard 5-hour half-life.
Enter a simple regular expression and see its equivalent Deterministic Finite Automaton diagram. Learn how regex engines work.
Test overscroll‑behavior: contain to prevent background scroll or pull‑to‑refresh. See the effect in a live demo.
Paste a website's HTML and see which text is only visible to screen readers (e.g., .sr‑only). Preview the accessible layer.
Paste your Accept‑Language header and see which languages your site should serve based on quality values. Internationalization helper.
Apply content‑visibility: auto to off‑screen sections and see the rendering cost drop. Demos for infinite scroll optimization.
Enter a regular expression and see a visual railroad diagram explaining the pattern. Learn and debug regex.
Drag a slider to compare your original image with a compressed version (e.g., WebP). See the quality difference and file size savings.
Plot different Big‑O complexities on a chart. See how O(log n) stays flat while O(2^n) explodes. Educational reference.
Toggle OpenType features like liga, smcp, tnum, and see the text update. Support for variable fonts. Typography nerds.
Paste HTML and see the order in which elements would receive focus via Tab key. Highlight issues. Local accessibility testing.
Simulate reduced motion preference and test your animations. Copy the media query snippet. Keep your users safe.
Resize the container and see the difference between repeat(auto‑fill, …) and auto‑fit. Understand responsive grid behavior.
See the difference between :focus and :focus‑visible on interactive elements. Learn which to use for better UX.
Enter text and see each character's 8‑bit binary laid out in a black‑and‑white grid. Beautiful data art. Local.
Paste your full CSS and HTML; automatically identify and extract the styles needed for the visible part. Reduce render‑blocking resources.
Draw walls on a grid and watch A*, Dijkstra, or BFS find the shortest path. Interactive animation. Learn graph traversal.
Detect browser support for font‑tech() and font‑format() values in @font‑face src. Check COLRv1, variable, etc.
Watch classic sorting algorithms step through a randomized bar chart. Adjust speed and array size. Great for learning algorithm efficiency.
Create simple 2‑ or 3‑set Venn diagrams by entering comma‑separated lists. Shareable via URL fragment. No account.