ColourTrans in 256 colour modes
Rick Murray (539) 13840 posts |
I am trying to figure out what ColourTrans is doing in a 256 colour mode when it’s being asked to set a GCOL from a palette entry.
As can be seen, the boxes at the bottom are the expected green gradient. What I’m looking for is: given an amount of red, green, or blue…return some value that can be used in the future to write that colour (or as close as it gets within the limitations of the mode) in the future. It seems like ColourTrans ought to be able to do this, but I’m just not making any sense of what I’m getting back from it. Am I missing something? |
Julie Stamp (8365) 474 posts |
The colour and tint returned are packed into a single byte. See PRM 3-337.
Does SetGCOL use an ECF even though bit 8 of R3 is clear? |
Rick Murray (539) 13840 posts |
Oh, right, it’s the one with the tint bits at the bottom, not the top. I was obviously “holding it wrong”. Brilliant, thanks! |