Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 compare colors using lower case hex codes #4438

Merged
merged 1 commit into from
Jan 10, 2025
Merged
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
54 changes: 27 additions & 27 deletions packages/@ourworldindata/grapher/src/color/CustomSchemes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,42 @@ export const CustomColorSchemes: ColorSchemeInterface[] = []
// Create some of our own!

export const OwidDistinctColors = {
Purple: "#6D3E91",
DarkOrange: "#C05917",
LightTeal: "#58AC8C",
Blue: "#286BBB",
Purple: "#6d3e91",
DarkOrange: "#c05917",
LightTeal: "#58ac8c",
Blue: "#286bbb",
Maroon: "#883039",
Camel: "#BC8E5A",
MidnightBlue: "#00295B",
DustyCoral: "#C15065",
DarkOliveGreen: "#18470F",
DarkCopper: "#9A5129",
Peach: "#E56E5A",
Mauve: "#A2559C",
Turquoise: "#38AABA",
Camel: "#bc8e5a",
MidnightBlue: "#00295b",
DustyCoral: "#c15065",
DarkOliveGreen: "#18470f",
DarkCopper: "#9a5129",
Peach: "#e56e5a",
Mauve: "#a2559c",
Turquoise: "#38aaba",
OliveGreen: "#578145",
Cherry: "#970046",
Teal: "#00847E",
RustyOrange: "#B13507",
Denim: "#4C6A9C",
Fuchsia: "#CF0A66",
TealishGreen: "#00875E",
Copper: "#B16214",
DarkMauve: "#8C4569",
Lime: "#3B8E1D",
Coral: "#D73C50",
Teal: "#00847e",
RustyOrange: "#b13507",
Denim: "#4c6a9c",
Fuchsia: "#cf0a66",
TealishGreen: "#00875e",
Copper: "#b16214",
DarkMauve: "#8c4569",
Lime: "#3b8e1d",
Coral: "#d73c50",
} as const

const OwidDistinctColorsNames = lazy(() => invert(OwidDistinctColors))

// These are variations of some of the colors above where the original color would have too little
// contrast against a white background for thin lines or text elements
export const DarkerOwidDistinctColors: Record<string, string> = {
DarkOrangeDarker: "#BE5915",
PeachDarker: "#C4523E",
LightTealDarker: "#2C8465",
DarkOrangeDarker: "#be5915",
PeachDarker: "#c4523e",
LightTealDarker: "#2c8465",
TurquoiseDarker: "#008291",
CamelDarker: "#996D39",
CamelDarker: "#996d39",
LimeDarker: "#338711",
}

Expand Down Expand Up @@ -565,7 +565,7 @@ export const BinaryMapPaletteB = {
displayName: "Binary map palette B",
singleColorScale: false,
isDistinct: true,
colorSets: [["#F1B6DA", "#b8e186"]],
colorSets: [["#f1b6da", "#b8e186"]],
}

CustomColorSchemes.push(BinaryMapPaletteB)
Expand All @@ -585,7 +585,7 @@ export const BinaryMapPaletteD = {
displayName: "Binary map palette D",
singleColorScale: false,
isDistinct: true,
colorSets: [["#FDB863", "#b2abd2"]],
colorSets: [["#fdb863", "#b2abd2"]],
}

CustomColorSchemes.push(BinaryMapPaletteD)
Expand Down
Loading