Pick one brand color and CSS derives the rest: color-mix() makes a light and dark shade, relative color syntax (rgb(from var(--brand) r 0 0)) peels apart its R/G/B channels, and contrast-color() recomputes readable text independently for all six swatches — no JavaScript, and no color picked by hand except the first one.
.card {
--brand: ;
--brand-light: color-mix(in srgb, var(--brand), #fff 30%);
--brand-dark: color-mix(in srgb, var(--brand), #000 30%);
--brand-r: rgb(from var(--brand) r 0 0);
--brand-g: rgb(from var(--brand) 0 g 0);
--brand-b: rgb(from var(--brand) 0 0 b);
}
/* every swatch above reads its own contrast-color(var(--x)) */