Maybe it's not really a problem, because we only display most significant 8 bits of these colors...
Unfortunately, some colors with same printString/storeString also have different pixelValues in Forms of 32bit depth:
This is because asHTMLColor is truncating the color components (taking 8 most significant bits, discarding 2 least significant) rather than rounding (Color component * 255 / 1023) rounded.
Currently (Squeak 6), red green blue components of Color are stored on 10 bits (2^10 => 1024 combinations)
But colors components are printed (and stored) with 3 decimals floating point notation, which leaves only 1001 possible representations
Therefore, some colors differs but share storeOn: representation:
Some colors are thus not preserved by round-trip conversion:
Maybe it's not really a problem, because we only display most significant 8 bits of these colors...
Unfortunately, some colors with same printString/storeString also have different pixelValues in Forms of 32bit depth:
Maybe it's not really a problem, because we only create Colors from
Alas, more annoyingly, some of those internal representation values are used by colors created from 8 bit components:
Even worse, two of those byte values will be converted back to different byte when HTML round-tripping:
This is because asHTMLColor is truncating the color components (taking 8 most significant bits, discarding 2 least significant) rather than rounding
(Color component * 255 / 1023) rounded
.