Color Theory
124 words
1 min read
Visual companion
Python
Type and operator map
Python Week 1: the first filter for runtime behavior
View
Revision summary
What this note is really saying
Short form
# Color Theory ## 3.1 Color Spaces Space Components Best For RGB Red, Green, Blue Screens HSL Hue, Saturation, Lightness Intuitive adjustments CMYK Cyan, Magenta, Yellow, Black Print ## 3.2 Color Schemes Scheme Description When to Use Sequential Light to dark of one hue Ordered data (0→100) Diverging Two hues meetin...

Color Theory
3.1 Color Spaces
| Space | Components | Best For |
|---|---|---|
| RGB | Red, Green, Blue | Screens |
| HSL | Hue, Saturation, Lightness | Intuitive adjustments |
| CMYK | Cyan, Magenta, Yellow, Black |
3.2 Color Schemes
| Scheme | Description | When to Use |
|---|---|---|
| Sequential | Light to dark of one hue | Ordered data (0→100) |
| Diverging | Two hues meeting at neutral | Data with a meaningful midpoint |
| Qualitative | Distinct hues | Categorical data |
pythonimport matplotlib.pyplot as plt import seaborn as sns # Sequential palette sns.color_palette("Blues", 5) # Diverging palette sns.color_palette("RdBu", 7) # Qualitative palette sns.color_palette("Set2", 8) # Apply to any plot plt.figure(figsize=(8, 4)) plt.scatter(range(10), range(10), c=range(10), cmap='viridis') plt.colorbar(label='Value') plt.show()
3.3 Accessibility
- Colorblind-friendly palettes: Use
viridis,cividis, orcolorblind10 - Don't rely solely on color: Use shapes, patterns, or direct labeling
- Sufficient contrast: Text should stand out from background
- Test: Simulate colorblind vision using
daltonizelibrary Join Discord PreviousChart SelectionNextAccessible Design