Page 1 of 1

[0.16.28]Map color different than lua file

Posted: Tue Mar 06, 2018 7:05 pm
by Bilka
When color picking the map color of the transport belt, I get #ce9e42. This can be converted to r: 0.80, g: 0.62, b: 0.26 which is different from ["transport-belt"] = {r = 0.8, g = 0.63, b = 0.28}, which is defined in data/core/prototypes/utility-constants.lua. The same can be done for all other map colors, each will yield slightly different color offsets.

Re: [0.16.28]Map color different than lua file

Posted: Tue Mar 06, 2018 7:15 pm
by posila
Map uses 16bit color format (RGB565) to save memory, so it has precision 0.03125 on red and blue channel and 0.015625 on green channel. In binnary/hex format it means tree (two) lowest bits are lost from RB (G)