Exercises — Chapter 3: Color
Part A: Conceptual (8 exercises)
These exercises test your understanding of color theory principles and palette selection logic. No tools or code required.
Exercise A-1: Palette Type Matching
For each of the following variables, identify whether a sequential, diverging, or categorical palette is appropriate. Justify your choice in one sentence.
a) Average daily rainfall in millimeters across 50 weather stations (values range from 2mm to 180mm) b) Net Promoter Score (NPS) for a product (values range from -100 to +100, with 0 as the neutral point) c) Department names in a company organizational chart (Engineering, Sales, Marketing, Legal, HR, Finance) d) Change in unemployment rate from 2020 to 2024 (values range from -4.2% to +6.8%, with 0 meaning no change) e) Elevation above sea level on a topographic map (values range from 0 to 4,500 meters) f) Blood type categories (A, B, AB, O)
Exercise A-2: Hue, Luminance, or Saturation?
For each scenario, state which color dimension (hue, luminance, or saturation) should be the primary encoding mechanism and explain why.
a) A choropleth map showing population density from sparse to dense b) A scatter plot where each point represents a different country, and you need the viewer to distinguish five countries c) A line chart showing revenue for six product lines, where you want the viewer to focus on one product that had anomalous growth d) A heatmap showing correlation coefficients from -1.0 to +1.0
Exercise A-3: The 7-Category Limit
A data analyst creates a bar chart showing social media engagement by platform: Facebook, Instagram, Twitter/X, TikTok, YouTube, LinkedIn, Pinterest, Snapchat, Reddit, Discord, WhatsApp, Telegram. Each platform is assigned a different color from a 12-color categorical palette.
a) What perceptual problem will viewers encounter? b) Propose two different redesign strategies that reduce the color burden while preserving all the data. c) Under what circumstances might a 12-color categorical palette be acceptable?
Exercise A-4: Luminance Monotonicity
Explain in your own words what it means for a colormap to be "monotonically increasing in luminance." Then explain why this property matters for:
a) Grayscale printing b) Colorblind accessibility c) Perceptual ordering of data values
Exercise A-5: The Midpoint Problem
A financial analyst creates a diverging palette (red-white-blue) to show quarterly profit margins across 20 business units. The data ranges from +2% to +38%, with an average of +15%.
a) What is wrong with this palette choice? b) The analyst argues that the midpoint should be the average (15%), so that business units below average are blue and those above are red. Is this a valid use of a diverging palette? Under what conditions? c) Propose an alternative approach.
Exercise A-6: Color Space Distinctions
Explain in two to three sentences why a step of 20 units in RGB space does not produce the same perceived color change regardless of starting position. Then explain why CIE LAB was designed and what property it provides that RGB lacks.
Exercise A-7: Redundant Encoding
Define redundant encoding and explain why it improves both accessibility and general readability. Give an example of a chart that uses color as the only encoding for a critical variable, and describe how you would add a second channel.
Exercise A-8: Semantic Color Trade-offs
A team in Tokyo and a team in New York are collaborating on a dashboard for a global company. The dashboard shows quarterly financial performance, with some regions posting losses and others posting gains.
a) The New York team wants to use red for losses and green for gains (Western financial convention). What problem does this create for colorblind team members? b) The Tokyo team points out that in Japanese financial contexts, gains are sometimes shown in red. How could this cultural difference cause misinterpretation? c) Propose a color scheme that works for both teams and passes colorblind simulation.
Part B: Applied (5 exercises)
These exercises ask you to critique specific color choices and propose improvements.
Exercise B-1: Critique the Heatmap
A data scientist publishes a heatmap of monthly website traffic for 12 months and 8 traffic sources. The heatmap uses the rainbow (jet) colormap. The accompanying paper notes that "traffic patterns show clear seasonal bands, with a distinct boundary between moderate and high-traffic months."
a) How might the "seasonal bands" and "distinct boundary" be artifacts of the rainbow colormap rather than features of the data? b) What colormap would you recommend, and why? c) The scientist argues that the rainbow version "shows more detail." How would you respond?
Exercise B-2: Fix the Dashboard
A Meridian Corp quarterly dashboard contains three charts: - Chart 1: A bar chart of revenue by product line (5 products). Colors: blue, red, green, orange, purple. - Chart 2: A line chart of revenue trend over 8 quarters. Each product line is a separate line. Colors: green, yellow, cyan, magenta, brown. - Chart 3: A pie chart of market share by region. Colors: blue, light blue, teal, navy, sky blue.
Identify at least four distinct color problems across these three charts and propose specific fixes for each.
Exercise B-3: The COVID Map
A local government creates a choropleth map showing COVID-19 case rates by neighborhood. The color scheme uses three levels: green (low), yellow (medium), red (high). The thresholds are 0-50 cases per 100K (green), 50-200 (yellow), 200+ (red).
a) Identify the colorblind accessibility problem. b) Identify the "color step" problem — how much data variation is hidden within each color band? c) A neighborhood at 195 cases/100K is colored yellow. A neighboring area at 205 cases/100K is colored red. What visual impression does this create, and is it proportional to the actual difference? d) Propose a redesigned color scheme that addresses all three problems.
Exercise B-4: The Presentation Disaster
An analyst prepares a chart for a conference presentation. The chart shows five time series on a line plot, using the colors: medium blue, dark blue, navy, teal, and periwinkle. The chart looks fine on the analyst's MacBook Pro.
a) What will happen when this chart is projected on a standard conference projector in a brightly lit room? b) What specific design principle from this chapter does this violate? c) Redesign the color scheme for the presentation context.
Exercise B-5: Print-Ready Figure
You are preparing a figure for a journal that still prints some issues in black and white. The figure is a scatter plot with three groups, currently colored in pure red, pure green, and pure blue (all at similar luminance levels).
a) Describe what this figure will look like when printed in grayscale. b) Redesign the figure's visual encoding to work in both color and grayscale. You may change colors, add shapes, adjust luminance, or use any combination of strategies.
Part C: Real-World (5 exercises)
These exercises require you to find and analyze actual published charts. Document your sources.
Exercise C-1: Find the Rainbow
Find a published chart (academic paper, news article, blog post, or government report) that uses a rainbow or jet colormap for continuous data.
a) Describe the chart and its data. b) Identify at least two specific perceptual problems caused by the rainbow colormap in this particular chart. c) What colormap would you recommend instead, and why? d) Record the source URL or citation.
Exercise C-2: Colorblind Audit
Find any data visualization online. Upload it to a colorblind simulation tool (coblis or Chrome DevTools).
a) Describe the original visualization. b) Take a note of how it appears under deuteranopia simulation. c) Does the visualization remain readable? What information is lost? d) Propose specific changes to make it colorblind-accessible.
Exercise C-3: Dashboard Color Consistency
Find a dashboard (corporate, government, or news) that contains at least three charts. Analyze the color-to-meaning mapping across all charts.
a) Is the same color used for the same meaning in all charts? b) If not, identify specific inconsistencies and explain how they could cause misinterpretation. c) Propose a consistent color mapping for the dashboard.
Exercise C-4: Semantic Color in the Wild
Find two visualizations from different cultural contexts that use color semantically (for example, financial reports from a Western source and an East Asian source, or political maps from two different countries).
a) Describe the color-meaning associations in each. b) Identify any associations that would be confusing if the visualization were shown to the other cultural audience. c) How would you design a culturally neutral version?
Exercise C-5: The Good Example
Find a visualization that you believe uses color exceptionally well. It should demonstrate at least three principles from this chapter (correct palette type, colorblind accessibility, semantic color, luminance gradient, or limited categorical colors).
a) Describe the visualization and its data. b) Identify each color principle it demonstrates and explain how. c) Is there anything you would change?
Part D: Synthesis (4 exercises)
These exercises require you to design color solutions from scratch, synthesizing multiple concepts from the chapter.
Exercise D-1: Design a Diverging Palette
Design a diverging color palette for a visualization of voter sentiment toward a public policy proposal. The data ranges from "strongly oppose" (-2) to "strongly support" (+2), with "neutral" (0) at the center.
a) Choose two hue anchors and a neutral midpoint. Justify your choices. b) Define five color steps (one for each integer from -2 to +2). Describe each color in words (e.g., "dark blue," "light blue," "white," "light orange," "dark orange"). c) Explain why your palette is colorblind-safe. d) Explain what your palette looks like in grayscale and why the ordering is preserved.
Exercise D-2: The Meridian Corp Brand Palette
Meridian Corp's brand guidelines specify two primary colors: a dark corporate blue and a warm gold. You need to create a complete visualization palette that includes:
a) A 6-color categorical palette for the company's six product lines b) A sequential palette for revenue heatmaps c) A diverging palette for year-over-year growth (negative to positive)
Describe each palette in words. Explain how the categorical palette maintains similar luminance across all six colors. Explain how the sequential and diverging palettes build from the brand colors while maintaining perceptual uniformity and colorblind safety.
Exercise D-3: The Public Health Map
You are designing a choropleth map to show vaccination rates by county in a U.S. state. Rates range from 28% to 94%. The state public health authority wants the map to: - Clearly show which counties are below the 70% herd-immunity threshold - Distinguish fine gradations both below and above the threshold - Be accessible to colorblind viewers - Print legibly in grayscale for a mailed report
a) Which palette type should you use, and where should you set the critical point? b) How many color steps do you recommend, and why? c) Describe your palette in words and explain how it meets all four requirements. d) Discuss the ethical considerations of the threshold: what happens if a county is at 69% vs. 71%? How does your color choice handle this?
Exercise D-4: Full Workflow Application
You have a dataset containing average air quality index (AQI) readings for 200 cities over 12 months. AQI values range from 0 (pristine) to 300 (hazardous). The EPA defines breakpoints: 0-50 Good, 51-100 Moderate, 101-150 Unhealthy for Sensitive Groups, 151-200 Unhealthy, 201-300 Very Unhealthy to Hazardous.
Walk through the complete 5-step palette selection workflow from Section 3.7:
- Identify the data type.
- Determine the number of levels.
- Select a candidate palette and describe it.
- Describe how you would perform the grayscale test.
- Describe how you would perform the colorblind simulation test.
Then: discuss whether the EPA breakpoints argue for a continuous palette or a discrete (classed) palette, and what the trade-offs are.
Part M: Mixed Review — Chapters 1 and 2 (3 exercises)
These exercises integrate concepts from earlier chapters with color principles.
Exercise M-1: Encoding Hierarchy Meets Color
In Chapter 2, we learned the Cleveland-McGill perceptual accuracy hierarchy: position > length > angle > area > color saturation. A chart designer argues: "Color is the first thing people notice, so it should be used for the most important variable."
a) Is this argument correct? Why or why not? b) How do you reconcile the fact that color is pre-attentive (Chapter 2) but low on the accuracy hierarchy (also Chapter 2)? c) When is it appropriate to use color for the primary variable, and when should color play a supporting role?
Exercise M-2: From Anscombe to Color
In Chapter 1, Anscombe's Quartet demonstrated that summary statistics can mask very different distributions. Design a scenario where poor color choices similarly mask important differences in data.
Give a specific example of a dataset and a color palette that would hide a critical pattern, and then show how a different palette would reveal it.
Exercise M-3: Pre-Attentive Color Pop-Out
In Chapter 2, we discussed pop-out effects: a single distinct visual feature "pops out" from a field of uniform features.
a) Which color dimension (hue, luminance, or saturation) produces the fastest pop-out for a single highlighted element among many? b) Design a scenario where you leverage color pop-out to draw attention to an outlier in a visualization. c) Design a scenario where color pop-out backfires — where an unintentional color difference draws attention to the wrong element.
Part E: Research (2 exercises)
These exercises require reading external sources.
Exercise E-1: The Crameri Paper
Read Crameri, Shephard, and Hainzl, "The Misuse of Colour in Science Communication" (Nature Communications, 2020). Answer the following:
a) What percentage of figures in the surveyed journals used a "perceptually non-uniform" colormap? b) What is the "exclusion" problem that the authors identify for colorblind readers? c) The authors propose a specific set of alternative colormaps. Name three of them and describe their properties. d) In your own words, explain the authors' argument for why colormap choice is an ethical issue, not just an aesthetic one.
Exercise E-2: The viridis Design Process
Watch Nathaniel Smith and Stéfan van der Walt's SciPy 2015 talk on designing the viridis colormap (search for "A Better Default Colormap for Matplotlib SciPy 2015").
a) What four criteria did the designers use to evaluate candidate colormaps? b) How did they test for perceptual uniformity? c) Why did they reject earlier candidates before settling on viridis? d) What was the community reaction to changing the default, and how was the transition managed?
Solutions to selected exercises are available in the Appendix.