mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 17:56:50 -06:00
When Flat Logo finds the colors itself (no colors named), a flat bar two pixels wide (whole pixels of one color) on a ground beside other art was lost or traced in another color. No bar pixel has a uniform 3 x 3 neighborhood, so neither the first clustering nor the check for unexplained colors took it. A gray bar on white beside black art was traced as white, and a red or green bar was traced as black. Bars three pixels wide or more were already found. The check for unexplained colors now also takes the pixels of such a bar: two rows or columns of one color (within about 3.5 in RGB distance), three pixels long, with the same ground on both sides. They count when the known colors do not explain them, and also when their color lies less than two thirds as far from the ground's known color as from every other known color, where the bar would otherwise be traced as the ground. A gray bar darker than about #9B9B9B on white beside black art stays black, #808080 included, because a black stroke 1 to 1.6 px wide on the pixel grid gives the same pixels. Named colors are unchanged.