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 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 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.
Compile LESS code to plain CSS in your browser. Check for syntax errors and get clean output. For legacy projects.
Pick two images or colors and apply all 16 CSS mix‑blend‑mode values live. See and copy the right CSS for your design.
Write global CSS and auto‑generate unique, scoped class names with source maps. Understand CSS Modules naming.
Set up Stylelint rules for your project by selecting extensions (SCSS, order, etc.). Output a valid .stylelintrc.
Paste code and get a beautifully highlighted preview with line numbers. Supports many languages. Copy as HTML. Pure frontend.
Paste your SCSS or Sass code and compile it to standard CSS. Basic sass.js engine runs in your browser. No server.
Browse a collection of common UI components (cards, modals, navbars) built with pure CSS. Preview and copy the HTML/CSS. Fast prototyping.
Build a custom CSS reset by toggling which elements to normalize. Copy the resulting stylesheet. Lean and clean.
Paste or upload an SVG and convert it into a CSS background‑image data URI. Clean and ready to embed.
Compile SCSS code to CSS directly in the browser using the official Sass.js library. Supports variables, mixins, nesting. No server upload required.
Type text and instantly see it rendered with text‑transform: uppercase, lowercase, capitalize, and full‑width. Copy CSS.
Type a word like 'sunset' or 'calm' and generate a color palette inspired by that mood. Simple associative mapping.
Design a modern button with gradients, shadows, and hover effects. Copy the clean CSS code.
Search a library of famous company brand colors with hex codes. Copy any color instantly. For designers and marketers.
Design beautiful buttons with gradients, shadows, and hover/active effects. No JavaScript required. Copy the CSS.
Drag points to create a custom clip‑path shape. See the CSS value update live. For creating non‑rectangular elements.
Pick an emoji and get the exact CSS content property value with escaped Unicode. For inserting emojis via CSS.
Toggle between normal, nowrap, pre, pre‑wrap, and pre‑line to understand how whitespace is handled. Live text example.
Set perspective and rotate children in 3D space. See the effect of perspective‑origin. Copy the CSS. Learn 3D transforms.
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.
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.
Build a complete font‑stack for your website. Choose a primary font and get the best fallback options for different OS. Copy the CSS.
Optimize an SVG and convert it into a URL‑encoded data URI ready for CSS backgrounds. Strip unnecessary attributes. All local.