diff --git a/components/ColorGrayPairs.tsx b/components/ColorGrayPairs.tsx index b6f243ce..18a4b6fc 100644 --- a/components/ColorGrayPairs.tsx +++ b/components/ColorGrayPairs.tsx @@ -20,8 +20,6 @@ const pairings = [ { color: "sand", pairs: ["yellow", "amber", "orange", "brown"] }, ]; -const darkTextPair = ["sky", "mint", "lime", "amber", "yellow"]; - export function ColorGrayPairs() { return ( @@ -65,9 +63,7 @@ export function ColorGrayPairs() { as="p" size="2" style={{ - color: darkTextPair.includes(pair) - ? `var(--${color}-12)` - : "white", + color: `var(--${pair}-contrast)`, textTransform: "capitalize", }} > diff --git a/components/ColorGrayPairsComplementary.tsx b/components/ColorGrayPairsComplementary.tsx index f3e5ec14..e23b631f 100644 --- a/components/ColorGrayPairsComplementary.tsx +++ b/components/ColorGrayPairsComplementary.tsx @@ -28,6 +28,10 @@ const darkBgColors = ["sky", "mint", "lime", "yellow", "amber"]; export function ColorGrayPairsComplementary() { return ( + + Scales designed for white foreground text: + + diff --git a/data/colors/docs/palette-composition/composing-a-palette.mdx b/data/colors/docs/palette-composition/composing-a-palette.mdx index b602a97e..8cd11e6b 100644 --- a/data/colors/docs/palette-composition/composing-a-palette.mdx +++ b/data/colors/docs/palette-composition/composing-a-palette.mdx @@ -13,8 +13,6 @@ metaDescription: A guide to composing a color palette with Radix Colors. Radix provides a number of scales you could use for your brand or accent color. -Scales designed for white foreground text: - ### Custom brand colors