Editor: color properties are clamping RGB values inconsistenly with the engine #2352
Labels
ags3
related to ags3 (version with full backward compatibility)
context: bw-compat
supporting deprecated runtime functionality, importing and converting game data
context: graphics
type: bug
unexpected/erroneous behavior in the existing functionality
what: editor
related to the game editor
Milestone
Problem
Because in AGS color index <-> RGB mapping is done based on 16-bit RGB values, both Editor and Engine fixup any assigned RGB value by clamping its components to R5G6B5 format (i think). (On a side note, there's a task to remove this clamping in ags4, see #1980)
However, it seems that Editor's mapping is different from the Engine's.
Sometimes the RGB value typed into a property field is clamped to one result, but using
Game.GetColorFromRGB
in script produces a different result.For example:
Input value: 167, 181, 147
Editor clamps to: 160, 180, 144
Engine clamps to: 165, 182, 148
UPDATE: user reports there's another inconsistency, when using Colours Pane for making color numbers and then trying to insert them into the color number properties. Following is user's explanation:
AGS Version
Any 3.* version, I think.
Expected behavior
I believe that the Editor should comply to the engine's formula when clamping colors.
The text was updated successfully, but these errors were encountered: