CSS Filter Generator - Online Visual SVG Filter Builder
Interactively apply CSS filter functions (blur, brightness, contrast, etc.) to an image and copy the resulting filter property. No coding required.
UD5 Toolkit
color-mix() Playground
Visual generator for the CSS Color Level 5 color-mix() function — blend colors in any color space
.my-element {
background-color: color-mix(in oklch, #3b82f6 50%, #eab308);
}
color-mix()?
color-mix() is a CSS function introduced in CSS Color Level 5 that allows you to blend two colors together in a specified color space. It returns a new color that is the weighted average of the two input colors. Unlike traditional opacity-based blending, color-mix() lets you choose the interpolation color space, which dramatically affects the visual result. This is a game-changer for creating dynamic color systems, hover states, and design tokens directly in CSS without preprocessing.
For the most perceptually uniform and natural results, use oklch or oklab. These modern color spaces are designed to match human perception, avoiding the "gray zone" problem that occurs in sRGB when mixing complementary colors (like blue and yellow). oklch is especially recommended for UI design because it preserves hue better during blending. Use srgb only when you need consistent results with legacy rendering or when matching existing sRGB-based designs.
mix()?
Sass's mix() function only blends in the sRGB color space and works at compile time. CSS color-mix() is native to the browser, supports 14+ color spaces, and can work with CSS custom properties (variables) at runtime. This means you can dynamically update colors based on user interaction, theming, or real-time data — something impossible with preprocessors. Additionally, modern color spaces like oklch produce far superior perceptual blends compared to sRGB.
color-mix()?
As of 2024, color-mix() is supported in all major modern browsers: Chrome 111+ (March 2023), Firefox 113+ (May 2023), Safari 16.2+ (December 2022), and Edge 111+. Internet Explorer does not support it. For older browsers, consider providing a fallback color. You can use @supports (color: color-mix(in srgb, red, blue)) for feature detection. Note that some wide-gamut color spaces like display-p3 and rec2020 may render differently depending on the user's display hardware.
color-mix() with CSS custom properties?
Yes! This is one of the most powerful features. You can define colors as CSS variables and mix them dynamically: color-mix(in oklch, var(--brand-primary) 80%, var(--brand-secondary)). Combined with :hover, :focus, or JavaScript-driven variable updates, you can create entire dynamic color systems without writing a single line of JavaScript color manipulation. This is ideal for design systems, dark mode theming, and accessibility-driven color adjustments.
According to the CSS specification, if the percentages sum to less than 100%, they are normalized proportionally. For example, color-mix(in srgb, red 20%, blue 30%) is treated as red 40% and blue 60% (20:30 ratio normalized to sum 100%). If percentages sum to more than 100%, they are also scaled down proportionally. If no percentages are specified, each color defaults to 50%. If only one color has a percentage, the other gets the remainder (100% minus the specified percentage).
color-mix()?
Common use cases include: (1) Hover/active states — mix a base color with white or black for instant button variants. (2) Design tokens — create entire color ramps from a few base colors. (3) Theming — blend brand colors for light/dark modes. (4) Accessible contrast — dynamically adjust text color by mixing with backgrounds. (5) Gradients — use color-mix() inside gradient stops for smoother transitions. (6) Component variants — generate subtle color variations for cards, badges, and alerts without writing extra CSS classes.
This is the classic demonstration of perceptual non-uniformity in sRGB. In the sRGB color space, blue and yellow are mathematical opposites on the color wheel, so averaging their RGB values produces a neutral gray. However, human perception doesn't follow sRGB math — we perceive blue+yellow as greenish (like mixing paint). The oklch color space was designed to match human perception, so it blends through the hue spectrum naturally, producing a vibrant green at 50%. This is why oklch is recommended for UI color blending.
Interactively apply CSS filter functions (blur, brightness, contrast, etc.) to an image and copy the resulting filter property. No coding required.
Select two paint colors and see approximate mixed result. Visual blending for artists.
Visually name grid areas in a table and generate grid‑template‑areas CSS. Perfect for complex layouts. Drag‑free.
Build a CSS media query by selecting feature, operator, and value. Copy the exact syntax for your stylesheet.
An interactive color wheel that teaches primary, secondary, tertiary colors, and harmonies. Pick and mix like a pro.
Enter hex codes and download a PNG swatch image with color names. Useful for design spec documents. Built via canvas.
Enter a router's MAC address or serial and generate the common default WPA passphrase for major ISP brands. Educational purpose only.
Design a layout where nested grids share track sizes with their parent via subgrid. Copy the complete CSS.
Pick colors for the shadcn/ui design system and generate the complete CSS variable theme file. Copy into your project.
Paste your CSS and see warnings for properties that have limited browser support. Links to CanIUse. Modernize safely.
Format a list of Q&A pairs and export as a CSV ready for Anki import. Simple line‑based template. Local.
Style underlines, overlines, and strike-throughs with colors, wavy styles, and thickness. Modern CSS text‑decoration.
Generate a random medieval occupation with a short description. For NPCs or historical curiosity. Local list.
Generate a hardboiled film noir plot with a detective, a dame, and a McGuffin. Great for creative writing prompts.
Generate a grand, aristocratic title like 'Duke of Waffleshire'. Perfect for silly fun or RPG characters. Local.
Design a button or card that glows on hover. Adjust shadow color, spread, and transition. Copy the CSS. Rich UI.
Create a realistic letterpress (debossed) text effect using CSS text‑shadow and background. Adjust depth and light direction. Copy code.
Generate a realistic‑sounding dinosaur name and see a fun description. Perfect for kids and writers.
Generate a subtle noise/grain texture as a CSS background pattern. Adjust opacity and size. For that film look.
Generate random but realistic‑looking data arrays (users, products, orders) with typos and missing fields. For test robustness.
Create a customizable checkerboard or grid background using pure CSS gradients. Adjust cell size and colors. Copy the code.
Create a custom HTML/CSS progress bar with percentage, colors, and animation. Copy the code. Modern UI element.
Fill in a few details and get a polished resignation letter. No data stored. Instant copy or print.
Paste plain text and turn it into a nested outline using indent levels or Markdown headings. Great for planning.
Upload a small pixel art image and get a CSS grid layout that recreates it using divs. Novelty developer tool.
Convert short text into a black‑and‑white Braille bump image ready for embossing. Educational and inclusive.
Generate a random, somewhat meaningful song lyric line. Write your own hit with AI‑free randomness. All local.
A replica of the famous Flexbox Froggy game: solve alignment puzzles by writing CSS. Progress saved locally. Fun frontend learning.
Generate a realistic‑sounding exoplanet designation (e.g., Kepler‑442b) and a sci‑fi planet description. For worldbuilding.
Create a realistic‑looking fake tweet with any name, handle, text, likes, and retweets. Just for laughs. All local canvas.