On this page
  1. color-mix()
  2. Syntax & Overview
  3. Notes & Best Practices
  4. Example

color-mix()

Prev: `oklch()` | Up: color | Next: `light-dark()`
Rel: color, Color & Value Functions Guide
Ref: MDN Web Docs — color-mix()
Tags: #public #web #css #functions #color #tier/standard


Syntax & Overview

color-mix(in oklch, var(--brand) 85%, black)

Blends two colors in a chosen color space to derive hover/border/surface variants dynamically.

Notes & Best Practices

Example

:root { --brand: oklch(58% 0.18 250); }
.btn { background: var(--brand); }
.btn:hover { background: color-mix(in oklch, var(--brand) 85%, white); }

Linked from

Related notes