Perceptual CIE L*a*b* D65 Cross-Stitch Quantization & Local Chart Architecture
Why Euclidean RGB Fails Embroidery Thread Matching
Naive cross-stitch generators compare red, green, and blue byte channels with unweighted Euclidean distance. Because human vision is far more sensitive to hue shifts in neutral skin tones and foliage than to luminance steps in saturated blues, RGB distance frequently picks muddy purple grays or neon greens when mapping artwork onto real cotton floss.
Floss Pattern Studio transforms every sampled grid cell from sRGB into CIE L*a*b* under a D65 daylight illuminant and evaluates CIE Publication 142-2001 CIEDE2000 perceptual difference against 470 versioned Standard 6-Strand Floss Codes. Chroma-dependent lightness, chroma, and hue-rotation terms ensure subtle portrait shadows and botanical gradients map to balanced embroidery shades.
Deterministic Browser-Only Execution Without Cloud Queues
Uploading personal family portraits or commissioned pixel illustrations to remote server farms exposes private artwork unnecessarily. Here, image decoding, box-area grid downsampling, k-medoids palette reduction, and symbol assignment run inside a dedicated ESM Web Worker whose network interfaces are permanently locked with non-writable stubs before processing starts.
- Oversized camera photographs above 2048 pixels are pre-downsampled safely via OffscreenCanvas before grid sampling.
- Deterministic ascending code tie-breaking guarantees identical thread selections across Windows, macOS, Linux, and mobile browsers.
- Interactive zoomable Canvas supports color-symbol, monochrome-symbol, and simulated cross-stitch previews alongside click-to-inspect cell ΔE00 readouts.