Surface texture broke a single-pixel eyedropper, so I wrote a client-side sampler to average colors from physical filament swatches.
About the project
The sunflower field print is also why I bought a second AMS. Cyan, magenta, yellow and white kept turning our faces maroon. The layer thickness killed the light before the mix could land on anything that looked like skin. More filaments would fix it, but only if I could measure exactly what each one did at each thickness.
So I printed a grid of swatches for every filament, stepped from thin to thick, set them on a light panel, and photographed the whole thing. Reading the photo was the hard part. Printed plastic has surface texture, and a single-pixel eyedropper landed on a ridge or a valley and gave a different answer every time. I wrote an area-averaging sampler that aggregates up to 256 pixels per swatch to find the true color. Collapsible palette sets keep multiple materials straight, and the result exports as a JSON file that LithoLab reads directly.
It is vanilla JavaScript with zero dependencies and runs in the browser. It is the reason the two dozen lithophanes since the sunflower print have skin tones instead of maroon.
- JavaScript