CSS Relative Color Syntax Playground - Online from a Base Color
Write CSS like `oklch(from red l c h)` to modify colors. Preview the output and copy. Modern color manipulation.
UD5 Toolkit
from keyword inside color functions like rgb(), hsl(), or oklch(), you can extract channel values (e.g., r, g, b) from a base color and apply mathematical transformations using calc(). This eliminates the need for preprocessor functions like Sass's darken() or lighten().
@supports queries or CSS custom properties with static fallbacks.
color-mix() blends two colors together in a specified color space (e.g., mixing blue and white to get light blue). Relative color syntax, on the other hand, derives a new color from a single base color by adjusting individual channels. You can increase saturation, shift hue, or adjust lightness without needing a second color. They complement each other: use color-mix() for blending, and relative colors for channel-level manipulation.
calc() expressions on channel values. For example, rgb(from var(--base) calc(r + 50) g b) brightens the red channel by 50 units. You can multiply, divide, add, subtract, and even combine operations like calc(l * 1.2) to boost lightness by 20%. This gives you fine-grained, dynamic control over color transformations directly in CSS.
Write CSS like `oklch(from red l c h)` to modify colors. Preview the output and copy. Modern color manipulation.
Pick two colors and mix them in different color spaces with sliders. See the difference between sRGB and OKLCH mixing. Copy the code.
Convert hex, RGB, or HSL into the modern OKLCH color space. See the preview and copy CSS oklch() value. Local.
Pick two images or colors and apply all 16 CSS mix‑blend‑mode values live. See and copy the right CSS for your design.
Pick a COLRv1 color font and change its palette with font‑palette. Create custom palettes with @font‑palette‑values.
Write scoped CSS rules that apply only within a subtree. See the boundary limits and avoid naming conflicts. New browser feature.
Drag points to create a custom clip‑path shape. See the CSS value update live. For creating non‑rectangular elements.
Set perspective and rotate children in 3D space. See the effect of perspective‑origin. Copy the CSS. Learn 3D transforms.
Type text and instantly see it rendered with text‑transform: uppercase, lowercase, capitalize, and full‑width. Copy CSS.
Design beautiful buttons with gradients, shadows, and hover/active effects. No JavaScript required. Copy the CSS.
Compile LESS code to plain CSS in your browser. Check for syntax errors and get clean output. For legacy projects.
Design a modern button with gradients, shadows, and hover effects. Copy the clean CSS code.
Build a custom CSS reset by toggling which elements to normalize. Copy the resulting stylesheet. Lean and clean.
Write global CSS and auto‑generate unique, scoped class names with source maps. Understand CSS Modules naming.
Add multiple CSS filters (grayscale, blur, hue‑rotate) to an image. See the combined effect. Copy the CSS filter value.
Design a fully styled scrollbar with colors, width, radius, and hover effects. Supports both ::-webkit‑scrollbar and Firefox scrollbar‑width.
Browse a collection of common UI components (cards, modals, navbars) built with pure CSS. Preview and copy the HTML/CSS. Fast prototyping.
Paste or upload an SVG and convert it into a CSS background‑image data URI. Clean and ready to embed.
Search a library of famous company brand colors with hex codes. Copy any color instantly. For designers and marketers.
Toggle scroll‑behavior: smooth and click anchor links to see the scrolling animation. Implement modern UX.
Set up Stylelint rules for your project by selecting extensions (SCSS, order, etc.). Output a valid .stylelintrc.
Paste your SCSS or Sass code and compile it to standard CSS. Basic sass.js engine runs in your browser. No server.
Compile SCSS code to CSS directly in the browser using the official Sass.js library. Supports variables, mixins, nesting. No server upload required.
Type a word like 'sunset' or 'calm' and generate a color palette inspired by that mood. Simple associative mapping.
Toggle between normal, nowrap, pre, pre‑wrap, and pre‑line to understand how whitespace is handled. Live text example.
Visually apply CSS transform functions like rotate, scale, skew, and translate. Obtain the exact CSS code for your elements. No coding needed.
Design a custom focus indicator with outline, offset, and box‑shadow. Preview on interactive elements. Copy the CSS.
Design a custom focus indicator with outline, offset, and box‑shadow. Preview on interactive elements. Copy the CSS.
Construct a CSS‑only carousel with scroll‑snap and scroll‑driven animations. Configurable gap, items, and progress indicator. Copy the HTML/CSS.
Browse a collection of ready-to-use CSS animations (fade, slide, bounce). Click to preview, then copy @keyframes and class to your project. Local tool.