Live Color Mix Blender - Online Mix Two Colors Visually
Pick any two colors and blend them proportionally with a slider. Get the resulting hex, RGB, and HSL. Pure client‑side.
UD5 Toolkit
color-mix() Transparency & Alpha Blend DemoExplore how colors blend across different color spaces — with full alpha transparency support
Blend Gradient Preview
Result Preview
CSS Code
color-mix(in srgb, #3b82f6 50%, #ef4444 50%)
Compare Across Color Spaces — same colors, different spaces
Quick Presets
color-mix() and how does it work?
color-mix() is a CSS function that blends two colors in a specified color space. Its syntax is:
color-mix(in <color-space>, <color1> <p1>, <color2> <p2>)
The percentages determine how much of each color contributes to the result. When percentages sum to less than 100%, the remainder is treated as transparent. This function works natively in all modern browsers (Chrome 111+, Firefox 113+, Safari 16.2+) and eliminates the need for preprocessors like Sass for color blending.
color-mix()?
Alpha transparency is fully respected in color-mix(). If a color has an alpha value less than 1 (e.g., rgba(255, 0, 0, 0.5)), the blending calculation accounts for that transparency. The final result's alpha is also computed appropriately. This is particularly useful for layering semi-transparent colors, creating glass-morphism effects, or building design systems with opacity tokens.
The mix percentage and the alpha channel are independent concepts: the percentage controls the blend ratio, while alpha controls each color's opacity before blending.
sRGB — Default, widely supported. Good for general use but can produce muddy midtones with complementary colors.
Oklab / Oklch — Perceptually uniform. Produces smooth, natural-looking gradients. Highly recommended for modern web design. Oklch uses hue-based notation which is intuitive for designers.
HSL / HWB — Good for hue-based blending. Can create vibrant intermediate colors, but may have uneven perceptual brightness.
Lab / Lch — Device-independent, perceptually uniform. Excellent for precise color work and when consistency across devices matters.
Display P3 — Wider gamut. Ideal if targeting modern Apple devices with P3 displays for richer, more saturated blends.
color-mix() and Sass/SCSS mix()?
Sass mix() always blends in sRGB space and is a compile-time operation — the result is a static hex/rgb value. CSS color-mix() is native browser functionality that:
color-mix()?
color-mix() well supported across browsers?
Yes! As of 2024, color-mix() has over 89% global browser support. It's supported in:
For older browsers, provide a fallback solid color using @supports:
.element {
background: #7b7cf9; /* fallback */
}
@supports (background: color-mix(in srgb, red 50%, blue 50%)) {
.element {
background: color-mix(in oklab, #3b82f6 50%, #ef4444 50%);
}
}
Pick any two colors and blend them proportionally with a slider. Get the resulting hex, RGB, and HSL. Pure client‑side.
Place bold text over an image and apply mix‑blend‑mode: screen, multiply, etc. Create stunning hero sections. Download preview.
Layer gradients and images and blend them with background‑blend‑mode. Create hero sections. Copy CSS.
Generate a unique, beautiful random gradient background with each click. Copy the CSS code. Endless inspiration.
Create text with a gradient fill using CSS background-clip. Configure colors and direction. Copy the code. Works in modern browsers.
Build a multi‑layer text‑shadow to simulate 3D extruded text. Control depth, color, and direction. Copy long shadow CSS.
Paste or write a CSS gradient value and instantly see the rendered output. Debug and iterate on gradients quickly. Local preview.
Convert hex, RGB, or HSL into the modern OKLCH color space. See the preview and copy CSS oklch() value. Local.
One click random beautiful gradient backgrounds with copy‑ready CSS. See full‑screen preview. Never run out of background ideas.
Control image‑orientation: from-image vs none. See how the browser interprets EXIF rotation. Fix portrait photos.
Upload multiple icon images and merge them into a single sprite sheet. Get the CSS background-position code. Optimize web performance.
Create complex linear gradients with any number of color stops, exact angles, and length units. Live preview and CSS code.
Create a custom HTML/CSS progress bar with percentage, colors, and animation. Copy the code. Modern UI element.
Create a realistic letterpress (debossed) text effect using CSS text‑shadow and background. Adjust depth and light direction. Copy code.
Create CSS clamp() values for fluid typography. Enter min and max font sizes and viewport widths. Modern responsive design.
Create a pure CSS scroll progress indicator using animation‑timeline: scroll(). No JavaScript. Copy the complete code.
Stack multiple text‑shadows to create a blurred, glowing gradient effect. Copy the long‑shadow CSS instantly.
Create color gradients that are perceptually uniform by interpolating in CIELAB space. Get the CSS linear‑gradient code. Visually superior.
Trace the edges of an uploaded image and create a glowing neon SVG effect. Adjust glow color and thickness. Download SVG.
Upload an image and see a rough simulation of how it might look when printed. Highlights areas that may lose detail.
See your monitor's color depth and pixel depth. Detect if HDR or wide gamut is available using media queries.
See the View Transitions API in action. Cross‑fade and morph between two states. Copy the JavaScript starter code.
Compare text‑rendering: auto, optimizeSpeed, optimizeLegibility, geometricPrecision. See kerning and ligature changes live.
Enter a URL and fetch its text/background colors to perform a bulk contrast check. See warnings for WCAG violations.
Convert transparent PNGs to solid JPGs by filling the background with white or any color. Fast and local.
Customize falling snow particles with pure CSS or canvas. Adjust speed, size, and wind. Copy the code for your website.
Force more or less contrast and see how your page adapts. Test your CSS media queries for accessibility.
Demonstrate frequency separation by splitting an image into high/low frequency layers. Visual tool, not full editor.
Slide left for cooler (blue) or right for warmer (orange) tones on your image. Quick photo adjustment. Local.
Enter the amount of leftover paint and see how many square feet it still covers. Plan touch-ups.