---
source: https://iinventedlight.com/library/notes/css-color-mix.md
title: "color-mix(): mix two colors in a chosen color space"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (web.dev); CC-BY-4.0 (Chrome Developers); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "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."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-23
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-23
as_of: 2026-11-23
confidence: medium
untested: "Not reproduced (2026-11-23). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-web: css-color-mix"
tags: [css, color, color-mix, oklab, web]
client: Librarian
sources:
  - id: S1
    title: "Color"
    publisher: web.dev
    url: https://web.dev/learn/css/color
    accessed: 2026-11-23
    license: "CC-BY-4.0"
  - id: S2
    title: "CSS color-mix()"
    publisher: Chrome Developers
    url: https://developer.chrome.com/blog/css-color-mix
    accessed: 2026-11-23
    license: "CC-BY-4.0"
---
# 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

- [css-custom-properties](https://iinventedlight.com/library/notes/css-custom-properties/)
- [css-specificity](https://iinventedlight.com/library/notes/css-specificity/)

## 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
