Colors everyone can read
About 1 in 12 men and 1 in 200 women see some colors differently, most often red and green. Some people print in black and white. A few small changes make our charts clear for everyone.
What we need
- R 4.0 or newer
- ggplot2
- A small table (we make it below)
A chart with red and green
Red and green side by side is the hardest pair for the most people.
library(ggplot2)
scores <- data.frame(
school = rep(c("North", "South", "East"), each = 2),
year = rep(c("Last year", "This year"), 3),
score = c(61, 70, 55, 52, 66, 74)
)
ggplot(scores, aes(school, score, fill = year)) +
geom_col(position = "dodge") +
scale_fill_manual(values = c("#D7191C", "#1A9641"))Loading the checked output…

Fix 1: a color-blind safe set
The Okabe-Ito colors were picked so people with every common type of color blindness can tell them apart. Base R has them built in.
okabe <- palette.colors(palette = "Okabe-Ito")
okabe
ggplot(scores, aes(school, score, fill = year)) +
geom_col(position = "dodge") +
scale_fill_manual(values = unname(okabe[c("orange", "blue")]))Loading the checked output…

Fix 2: viridis, which also prints in gray
Viridis colors go from dark to light, so the order still shows in black and white. ggplot2 has them built in.
ggplot(scores, aes(school, score, fill = year)) +
geom_col(position = "dodge") +
scale_fill_viridis_d(end = 0.8)Loading the checked output…

Fix 3: do not rely on color alone
Put the words on the chart. Then nobody needs the legend, and the colors become a bonus.
ggplot(scores, aes(school, score, fill = year)) +
geom_col(position = "dodge") +
geom_text(aes(label = year), position = position_dodge(0.9), vjust = -0.4, size = 3) +
scale_fill_manual(values = c("grey70", "grey25")) +
theme(legend.position = "none")Loading the checked output…

Kitchen tip: the habit that prevents this
Pick colors that differ in light and dark, not only in hue. If our chart still works printed in gray, it works for almost everyone.
Three common mix-ups
- Red for bad and green for good: the meaning is lost for many readers. Use blue and orange instead.
- Too many colors. Past about seven, nobody can match them to the legend.
- Light yellow lines on a white background: nobody can see them.
Quick check
Which pair of colors is hardest for the most people to tell apart?
Practice: try it here
This chart uses red and green, which about 1 in 12 men see differently. Give p a color-blind safe fill, for example the Okabe-Ito colors or viridis.
Change the code in the box, then press Run to see what it does, and Check my answer when it looks right. It all runs in this browser, so nothing is sent anywhere.
Swap scale_fill_manual(...) for scale_fill_viridis_d(), or use values = unname(palette.colors(palette = "Okabe-Ito"))[2:3].
library(ggplot2)
votes <- data.frame(
park = rep(c("North", "South"), each = 2),
year = rep(c("2025", "2026"), 2),
votes = c(40, 55, 62, 48)
)
p <- ggplot(votes, aes(park, votes, fill = year)) +
geom_col(position = "dodge") +
scale_fill_viridis_d(end = 0.8)
p- avoid red next to green
- palette.colors("Okabe-Ito")
- scale_fill_viridis_d()
- label the bars, too
Keep the recipe card
A one-picture summary to pin next to a screen or send to a friend who is stuck on the same thing.
Trying this on other data? Check the row counts and results before and after each step. Package versions change, so if something here works differently, please tell us. Every output on this page comes from running the code above in R; please cross-check before relying on it for our work.