CSS Relative Color Playground - Online Manipulate Colors
Write CSS like `oklch(from red l c h)` to modify colors dynamically. Preview the output and copy the code.
UD5 Toolkit
Generate lighter, darker, saturated & custom color variants from a single base — using modern CSS rgb(from ...) & hsl(from ...) syntax.
from keyword inside rgb(), hsl(), oklch(), and other color functions, you can reference a source color and apply calc() expressions to its channels. For example: rgb(from var(--brand) calc(r + 30) calc(g + 30) calc(b + 30)) creates a lighter variant.
:root { --primary: #3b82f6; }.btn-hover { background: rgb(from var(--primary) calc(r + 20) calc(g + 20) calc(b + 20)); }--primary automatically updates all derived variants across your entire stylesheet — no need for preprocessors like Sass.
rgb(from ...) operates in the sRGB color space with channels r, g, b (0–255) and an optional alpha (0–1). It's intuitive for lightening/darkening by adding/subtracting from all channels. hsl(from ...) operates in HSL space with h (0–360), s (0–100), l (0–100). It's better for saturation adjustments, hue rotations, and maintaining perceptual brightness. Choose based on the visual effect you want.
rgb(from #ff6b6b calc(r - 50) g b) or hsl(from rgb(100,200,150) h calc(s * 0.5) l). However, using CSS variables makes your code much more maintainable and is the recommended approach for design systems and theming.
lighten(), darken(), saturate(), adjust-hue(), and rgba() opacity variants from Sass. The key advantage: these are runtime, dynamic calculations in the browser, responding to CSS variable changes — something preprocessors cannot do. However, Sass still has value for more complex color math and compile-time optimizations.
rgb(), hsl(), hwb(), lab(), lch(), oklab(), oklch(), and the color() function for display-p3 and other wide-gamut spaces. Each space gives you access to different channels for manipulation. For example, oklch(from ... l c h) lets you adjust perceptual lightness, chroma, and hue in the perceptually uniform OKLCH space.
Write CSS like `oklch(from red l c h)` to modify colors dynamically. Preview the output and copy the code.
Pick a COLRv1 color font and change its palette with font‑palette. Create custom palettes with @font‑palette‑values.
Write modern CSS color functions like oklch(), lab(), hwb() and see the rendered color with fallback. Copy compatible code.
Pick two colors and mix them in different color spaces with sliders. See the difference between sRGB and OKLCH mixing. Copy the code.
Write scoped CSS rules that apply only within a subtree. See the boundary limits and avoid naming conflicts. New browser feature.
Visually create beautiful linear and radial gradients. Get the CSS code instantly. Copy the code or export as image. Perfect for web designers.
Pick two images or colors and apply all 16 CSS mix‑blend‑mode values live. See and copy the right CSS for your design.
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.
Write global CSS and auto‑generate unique, scoped class names with source maps. Understand CSS Modules naming.
Browse a collection of common UI components (cards, modals, navbars) built with pure CSS. Preview and copy the HTML/CSS. Fast prototyping.
Toggle between normal, nowrap, pre, pre‑wrap, and pre‑line to understand how whitespace is handled. Live text example.
Drag points to create a custom clip‑path shape. See the CSS value update live. For creating non‑rectangular elements.
Compile LESS code to plain CSS in your browser. Check for syntax errors and get clean output. For legacy projects.
Paste code and get a beautifully highlighted preview with line numbers. Supports many languages. Copy as HTML. Pure frontend.
Create gradient‑filled text with the background‑clip property. Choose linear or radial gradients. Get the CSS. Modern typography.
Design beautiful buttons with gradients, shadows, and hover/active effects. No JavaScript required. Copy the CSS.
Set up Stylelint rules for your project by selecting extensions (SCSS, order, etc.). Output a valid .stylelintrc.
Paste or upload an SVG and convert it into a CSS background‑image data URI. Clean and ready to embed.
Paste a CSS gradient and export a vertical swatch image. Ideal for design documents. No server needed.
Paste your SCSS or Sass code and compile it to standard CSS. Basic sass.js engine runs in your browser. No server.
Style the <progress> and <meter> elements with cross‑browser CSS. Adjust colors and sizes. Copy the final styles.
Compile SCSS code to CSS directly in the browser using the official Sass.js library. Supports variables, mixins, nesting. No server upload required.
Interactively apply CSS filter functions (blur, brightness, contrast, etc.) to an image and copy the resulting filter property. No coding required.
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.
Add multiple CSS filters (grayscale, blur, hue‑rotate) to an image. See the combined effect. Copy the CSS filter value.
Visually apply CSS transform functions like rotate, scale, skew, and translate. Obtain the exact CSS code for your elements. No coding needed.
Convert a small image into a CSS background‑image data URL or a tiled pattern snippet. Speed up your website with inline assets.
Pick an emoji and get the exact CSS content property value with escaped Unicode. For inserting emojis via CSS.
Minify JavaScript and CSS code to reduce file size for production. Remove whitespace and comments instantly. Run locally, your code stays private.