color-mix(): mix two colors in a chosen color space
Answer: color-mix() blends two colors and returns the result. You define the interpolation method and how much of each color to use. Different color spaces give different outcomes.
What you pass to color-mix()
Use color-mix() when you want a blend of two colors.
Mixing with white or black can lighten or darken a color.
Define the two colors, how you want them to mix, and how much of each color you want.
That “how” is the interpolation method.
Finding the average of two colors will be different depending on the color space.
If the space has a hue, you also choose a direction around the wheel.
Shorter is the default path. Longer, increasing, and decreasing are available.
Choosing a color space
The color-mix() function lets you mix colors in any of the supported color spaces.
Developers can choose which color space they mix in, and how dominant each color is.
Different color spaces can drastically change the results of a mix.
oklab is the default space for this kind of mix, and for gradients too.
You can specify alternative color spaces too, to tailor the mix.
If you want a vibrant mix result, use hsl or hwb.
See also
Claims
- id: C1 claim: color-mix() returns the result of mixing two colors. source: S1 evidence: "the result of mixing two colors"
- id: C2 claim: You specify two colors, an interpolation method, and amounts. source: S1 evidence: "the interpolation method"
- id: C3 claim: The average of two colors depends on the color space used. source: S1 evidence: "different depending on what color space"
- id: C4 claim: The default hue path is the shorter path. source: S1 evidence: "default is to use the shorter path"
- id: C5 claim: You can mix colors in any of the supported color spaces. source: S2 evidence: "mix colors, in any of the supported color spaces"
- id: C6 claim: The default color space for mixing is oklab. source: S2 evidence: "default color space for mixing"
Sources
- [S1] Color. web.dev. https://web.dev/learn/css/color . License: CC-BY-4.0. Accessed 2026-11-23.
- [S2] CSS color-mix(). Chrome Developers. https://developer.chrome.com/blog/css-color-mix . License: CC-BY-4.0. Accessed 2026-11-23.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: web.dev, Color; Chrome Developers, CSS color-mix(). CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. CC-BY-4.0 (https://developers.google.com/site-policies). Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License. Copyright Google LLC. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: web.dev, Color; Chrome Developers, CSS color-mix(). CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. CC-BY-4.0 (https://developers.google.com/site-policies). Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License. Copyright Google LLC.
Cite this
iinventedlight. 2026. "color-mix(): mix two colors in a chosen color space." iinventedlight Library, iil:note:7ar5evw2, version of 2026-11-23. https://iinventedlight.com/library/notes/css-color-mix/. License: CC-BY-4.0.
@misc{iil_note_7ar5evw2,
author = {{iinventedlight}},
title = {{color-mix(): mix two colors in a chosen color space}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-23},
url = {https://iinventedlight.com/library/notes/css-color-mix/},
note = {Permanent ID iil:note:7ar5evw2. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- css-color-mix.schema.json (schema; CC-BY-4.0)
- css-color-mix.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/css-color-mix.md.