I want to find a way to convert RGB colors used by classic Mac OS to RGB colors that are understandable to modern image editors and to web browsers.
The two palettes that are subjects of my interest are as follows:
System 4.1 system colors
R G B
65535, 65535, 65535
64512, 62333, 1327
65535, 25738, 652
56683, 2242, 1698
62167, 2134, 34028
18147, 0, 42302
0, 0, 54272
577, 43860, 60159
7969, 46995, 5169
0, 25775, 4528
22016, 11421, 1316
37079, 29024, 14900
49152, 49152, 49152
32768, 32768, 32768
16384, 16384, 16384
0, 0, 0
System 7 icon colors
R G B
65535, 65535, 52428
65535, 52428, 39321
52428, 39321, 26214
65535, 26214, 13107
13107, 65535, 39321
0, 48059, 0
13107, 39321, 26214
13107, 26214, 26214
39321, 65535, 65535
0, 39321, 65535
0, 0, 56797
13107, 0, 39321
52428, 52428, 65535
39321, 39321, 65535
26214, 26214, 52428
13107, 13107, 26214
65535, 26214, 52428
39321, 0, 26214
39321, 26214, 39321
65535, 65535, 65535
61166, 61166, 61166
56797, 56797, 56797
52428, 52428, 52428
48059, 48059, 48059
43690, 43690, 43690
34952, 34952, 34952
30583, 30583, 30583
21845, 21845, 21845
17476, 17476, 17476
8738, 8738, 8738
4369, 4369, 4369
0, 0, 0
65535, 65535, 0
56797, 0, 0
As you can see, the color values are from 0 to 65535. What I don't understand is that how to properly, that is, precisely, convert them to "modern" RGB, such as, for example, rgb(100, 149, 237)
for cornflower blue.
I have asked on Stack Overflow and there is an answer there, but:
As follows from the discussion there, RGB565 is not the same as RGB16, but both of them use color values from 0 to 65535, and this means I don't understand which of these two RGB variants were used by classic Mac OS, and this means I don't know whether the answer there gives accurate values if we talk about converting colors of classic Mac OS.
Later I have found another answer on Stack Overflow, and after reading it I suspect that the conversion proposed in the first answer is not really correct at all, because shifting for G must be different from shifting for R and B.
If there are vintage Mac gurus here, plese help me to not go cranky.
(componentValue / 256)
for each color component to get down to RGB888.(>> 8)
means divide by 256. Dividing by 256 is the same as shifting by 8. It's kind of like Germany is the same as Deutschland - two ways of saying exactly the same thing. However, dividing by 257 is not the same thing a shifting by 8