Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions components/ColorGrayPairs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ const pairings = [
{ color: "sand", pairs: ["yellow", "amber", "orange", "brown"] },
];

const darkTextPair = ["sky", "mint", "lime", "amber", "yellow"];

export function ColorGrayPairs() {
return (
<Box>
Expand Down Expand Up @@ -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",
}}
>
Expand Down
6 changes: 5 additions & 1 deletion components/ColorGrayPairsComplementary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ const darkBgColors = ["sky", "mint", "lime", "yellow", "amber"];
export function ColorGrayPairsComplementary() {
return (
<Box>
<Text as="p" mb="3">
Scales designed for white foreground text:
</Text>

<Grid
align="center"
my="5"
Expand Down Expand Up @@ -77,7 +81,7 @@ export function ColorGrayPairsComplementary() {
as="p"
size="2"
style={{
color: `var(--${color}-9-contrast)`,
color: `var(--${color}-contrast)`,
textTransform: "capitalize",
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:

<ColorGrayPairsComplementary />

### Custom brand colors
Expand Down