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.
Write modern CSS color functions like oklch(), lab(), hwb() and see the rendered color with fallback. Copy compatible code.
Pick a COLRv1 color font and change its palette with font‑palette. Create custom palettes with @font‑palette‑values.
Pick two colors and mix them in different color spaces with sliders. See the difference between sRGB and OKLCH mixing. Copy the code.
Pick two images or colors and apply all 16 CSS mix‑blend‑mode values live. See and copy the right CSS for your design.
Visually create beautiful linear and radial gradients. Get the CSS code instantly. Copy the code or export as image. Perfect for web designers.
Write scoped CSS rules that apply only within a subtree. See the boundary limits and avoid naming conflicts. New browser feature.
Set perspective and rotate children in 3D space. See the effect of perspective‑origin. Copy the CSS. Learn 3D transforms.
Drag points to create a custom clip‑path shape. See the CSS value update live. For creating non‑rectangular elements.
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.
Browse a collection of common UI components (cards, modals, navbars) built with pure CSS. Preview and copy the HTML/CSS. Fast prototyping.
Write global CSS and auto‑generate unique, scoped class names with source maps. Understand CSS Modules naming.
Visually apply CSS transform functions like rotate, scale, skew, and translate. Obtain the exact CSS code for your elements. No coding needed.
Add multiple CSS filters (grayscale, blur, hue‑rotate) to an image. See the combined effect. Copy the CSS filter value.
Create gradient‑filled text with the background‑clip property. Choose linear or radial gradients. Get the CSS. Modern typography.
Compile LESS code to plain CSS in your browser. Check for syntax errors and get clean output. For legacy projects.
Interactively apply CSS filter functions (blur, brightness, contrast, etc.) to an image and copy the resulting filter property. No coding required.
Add rows and columns, merge cells, and set gaps visually. Get the grid‑template CSS and HTML. Fast layout prototyping.
Paste a CSS gradient and export a vertical swatch image. Ideal for design documents. No server needed.
Toggle between normal, nowrap, pre, pre‑wrap, and pre‑line to understand how whitespace is handled. Live text example.
Build CSS Grid layouts by defining columns, rows, and gaps visually. Get the complete grid CSS code. An essential web design tool running in the browser.
Style the <progress> and <meter> elements with cross‑browser CSS. Adjust colors and sizes. Copy the final styles.
Paste or upload an SVG and convert it into a CSS background‑image data URI. Clean and ready to embed.
Convert a small image into a CSS background‑image data URL or a tiled pattern snippet. Speed up your website with inline assets.
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.
Set up Stylelint rules for your project by selecting extensions (SCSS, order, etc.). Output a valid .stylelintrc.
Create circular and elliptical clip paths visually. Adjust radius and position. Copy the CSS. For avatars and masks.
See how overflow: visible, hidden, scroll, and auto behave with real content. Clone to test with your text.