HTML & CSS · Senior · Question 30 of 75

What is color-mix(in oklch, var(--brand) 80%, white) for?

Explanation

color-mix() blends colors in a given color space at a given ratio. It lets you derive hover states, translucent variants (color-mix(in srgb, red, transparent 50%)) and tints from a single brand variable. Tailwind v4 uses it to implement opacity modifiers like bg-brand/50.

Further reading

Problem with a question

HTML & CSS · Senior · question 30

Test yourself

Take the HTML & CSS · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz