Skip to content

Commit 7b804b8

Browse files
svgeesusclaude
andcommitted
[css-color-hdr][editorial] Add Jzazbz prim-sec diagram and its generator script
Adds images/2020-prim-sec-JzCzHz.svg (rec2020 primaries/secondaries plotted on the Jzazbz az,bz plane, with sRGB shown as a dashed comparison overlay and a Jz/Cz/hz legend table below the plot) and workings/JzCzhz-diagram/, a small script to regenerate it if needed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 178bea2 commit 7b804b8

3 files changed

Lines changed: 406 additions & 0 deletions

File tree

Lines changed: 110 additions & 0 deletions
Loading
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Jzazbz primaries/secondaries diagram generator
2+
3+
Regenerates `css-color-hdr-1/images/2020-prim-sec-JzCzHz.svg`: a diagram
4+
plotting the rec2020 primaries and secondaries on the Jzazbz az,bz plane,
5+
with the sRGB gamut shown as a dashed comparison overlay and a Jz/Cz/hz
6+
legend table below the plot. (This is the sibling of
7+
`css-color-4/workings/oklch-prim-sec/`, which does the same thing for
8+
Oklab, but Jzazbz isn't in colorjs.io so the source Jz/Cz/hz and az/bz
9+
values are hardcoded in the script instead of computed live.)
10+
11+
## Usage
12+
13+
```
14+
node generate.mjs
15+
```
16+
17+
No dependencies — the Jz/Cz/hz and az,bz values were computed once (see
18+
`../../jzazbz.js` for the conversion formulas) and are hardcoded at the
19+
top of `generate.mjs`. This overwrites `../../images/2020-prim-sec-JzCzHz.svg`.
20+
Diff/review before committing.
21+
22+
## Notes
23+
24+
- If the underlying Jz/Cz/hz values ever need recomputing (e.g. a change
25+
to the Jzazbz conversion), redo the conversion for rec2020 and sRGB's
26+
red/green/blue/cyan/magenta/yellow and update the `rec2020` / `srgb`
27+
tables in `generate.mjs`; the plot framing, legend layout, and axis
28+
labels are all generated automatically from those values.
29+
- If the diagram's aspect ratio changes, update the `<img width height>`
30+
values wherever this file is referenced (currently not referenced from
31+
`Overview.bs`).

0 commit comments

Comments
 (0)