What the painters were given

Color semantics (stream 1, branch color)

notes/color.md · 217 lines · Notes

Given to 4 painters:

Color semantics (stream 1, branch color)

The problem

A paint's color used to mean "how one coat looks over white": Pigment::with_hiding(color, hiding) set the over-white look to color and the over-black look to color × hiding. For any paint that doesn't fully hide, the masstone (the paint laid thick) is darker than that. So a mark mixed to match a field dried darker than the field, and a thin passage dried darker than asked. The fresh painters hit this as dark stipple specks, darkened glazes and recipe seams in the coast sky. They worked around it by sampling the canvas by hand (aim() in paintings/fresh/fresh_coast.rs).

What color means now

Aim at the result

A painter judges a pile on the canvas: "what will this look like here, over what is already painted, laid as thick as I lay it?" That question now has an answer at three levels:

// what is on the canvas at a point (dry picture + wet paint, disc of radius r)
let under = c.under(x, y, r);
// preview: how a paint looks laid `coats` thick over it
let look = paint.over(under, coats);

// per mark (stipple, dabs, hand-made strokes): the pile from the palette
// that, thinned with `medium` and laid `coats` thick here, looks `want`
let p: Paint = c.aim(&pal, want, (x, y), r, medium, coats);
let m: Mixture = pal.aim(want, under, medium, coats);   // same, with the recipe
let p = pal.paint_for(want, under, medium, coats);       // same, as Paint
// no palette: solve the masstone for a fixed hiding
let p = Paint::aimed(want, under, coats, hiding, stiff);
// name paint by hiding, override on a mixed paint
let p = pal.paint(col, 0.0).with_hiding(0.97).with_stiff(1.0);

// handlings: palette-mixed handlings aim by default
st.broad().color(sky)                  // Aim::Laid: expects the thickness it lays
st.broad().color(sky).aim(0.8)         // expect 0.8 coats
st.body().color(rock).by_masstone()    // color = masstone, don't look
st.glaze(0.9).color(umber)             // glazes mix by masstone (depth is load_at's job)
st.broad().palette(&family)            // swap in a paint family, keep the medium

For the stipple stream

Call c.aim(&pal, want, (x, y), r, medium, coats) per dot, with r about the dot radius and coats about 0.5–1 for a dot (the spread covers 0.5×–2×). To stipple a sky lighter by a touch, aim at the sampled look plus a bit of OKLab L:

let mut l = to_oklab(c.under(x, y, r)); l[0] += 0.05;
let p = c.aim(&pal, from_oklab(l), (x, y), r, 0.6, 0.6);

under includes wet paint, so dots over a wet passage are judged against it. Canvas::aim takes &self and the palette caches behind a Mutex, so it is safe to call when planning marks in parallel (results are order-independent).

Tests (crates/paint)

Evidence

cargo paint study_color → out/study_color.png (paintings/src/bin/study_color.rs; the header comment maps the panels).

Shared files touched (small, local)

Known issues and next steps

Source