Open this example in the interactive library
Live preview
Source code
// components/CSSTintScale.tsx
export default function CSSTintScale({ hex = "#bc805a" }: { hex?: string } = {}) {
return (
<ol>
{[0, 25, 50, 75, 100].map((p) => (
<li
key={p}
style={{
borderInlineStart:
"3rem solid color-mix(in srgb," + hex + " " + p + "%,white)",
}}
>
{p}% pigment
</li>
))}
</ol>
);
}
