You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Phase A of the big plot migration. Swaps #306998 (Python Blue) for
#009E73 (Okabe-Ito brand green) across the 11 generation prompts —
plot-generator.md, default-style-guide.md, and the 9 library prompts.
Each library prompt now ships a theme-adaptive chrome mapping (PAGE_BG /
ELEVATED_BG / INK / INK_SOFT / RULE tokens) so implementations render
once per theme via ANYPLOT_THEME and emit plot-light.png + plot-dark.png
(plus plot-light.html + plot-dark.html for interactive libs). Continuous
data uses viridis/cividis/BrBG — never jet/rainbow on Okabe-Ito
categorical data.
Adds VQ-07 "Palette Compliance" (2 pts) to quality-criteria.md and
reduces VQ-04 from 4 to 2 pts (pure contrast/CVD check; palette choice
is scored separately now) — Visual Quality stays at 30 pts total.
quality-evaluator.md and ai-quality-review.md require inspection of
BOTH theme renders; impl-repair-claude.md lists common VQ-07 fixes.
Existing implementations still render #306998 on white backgrounds —
Phase D will regenerate them incrementally via daily batches once
Phase B (multi-language paths + DB schema) and Phase C (dark/light
pipeline in workflows) land. A, B, C are independently shippable.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: prompts/default-style-guide.md
+73-28Lines changed: 73 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,37 +30,45 @@ Two formats are allowed (similar pixel count for consistent font sizing):
30
30
31
31
## Color Philosophy
32
32
33
-
### Primary Color
33
+
anyplot uses the **Okabe-Ito palette** — a peer-reviewed, colorblind-safe categorical palette designed for scientific publication. It is the single consistency rule that spans every library and every plot.
34
34
35
-
**Python Blue `#306998`** is the only recommended color for single-series plots. It is the brand anchor for every anyplot visualization.
-**Diverging**: `RdBu`, `PiYG`, `coolwarm` (centered on meaningful midpoint)
56
-
- Avoid rainbow colormaps (`jet`, `hsv`) — they are not perceptually uniform
65
+
-**2-3 colors** is ideal for most categorical plots.
66
+
-**4-5 colors** is the practical maximum.
67
+
-**6+ colors** is rare — prefer grouping or a sequential colormap instead.
57
68
58
69
### Colorblind Safety
59
70
60
-
All color choices must be distinguishable by people with deuteranopia and protanopia:
61
-
- Avoid red-green as the only distinguishing feature
62
-
- Use luminance differences (light vs dark), not just hue
63
-
- When in doubt, test with a colorblind simulator
71
+
The Okabe-Ito palette is already safe for deuteranopia and protanopia. Never override it with custom categorical hexes unless you have a documented reason.
64
72
65
73
---
66
74
@@ -82,9 +90,46 @@ Every visual element must earn its place. If removing an element doesn't reduce
82
90
83
91
### Background
84
92
85
-
- Clean white (`#FFFFFF`) is the default
86
-
- Very faint warm gray (`#FAFAFA`) is acceptable as an alternative
87
-
- Never use colored or dark backgrounds
93
+
anyplot plots live inside page surfaces that are warm off-white / near-black, **never pure white or pure black** (pure values make the saturated palette look harsh).
- The background is theme-dependent and must match the surface where the plot will be embedded on the website.
101
+
- Implementations read `os.environ["ANYPLOT_THEME"]` (`"light"` or `"dark"`, default `"light"`) and render accordingly. The pipeline runs each implementation twice to produce `plot-light.png` and `plot-dark.png`.
102
+
- Never use pure `#FFFFFF`, pure `#000000`, or unrelated colored backgrounds.
103
+
104
+
### Theme-adaptive Chrome
105
+
106
+
In addition to the background, every non-data element (title, axis labels, tick labels, spines, grid, legend text, annotations, callout-box fills, footnotes) must use theme-adaptive tokens. Only the Okabe-Ito data colors (positions 1–7) stay constant.
107
+
108
+
| Role | Light theme | Dark theme |
109
+
|------|-------------|------------|
110
+
| Primary text (title, axis labels) |`#1A1A17`|`#F0EFE8`|
111
+
| Secondary text (tick labels, legend, subtitles) |`#4A4A44`|`#B8B7B0`|
112
+
| Tertiary text (footnotes, meta annotations) |`#8A8A82`|`#6E6D66`|
0 commit comments