Jump to content


Photo

Hex code colors


  • Please log in to reply
4 replies to this topic

#1 temnix

temnix
  • Member
  • 983 posts

Posted 25 December 2017 - 01:56 PM

For some reason I'm not getting the right colors with the hex code convention in BG:EE. To color text, I'm supposed to write: ^0x########Text. The first two symbols control transparency, for no transparency they are supposed to be always ff. I went and looked up the code for a nice shade of red to continue, and wrote: ^0xfff00c24Text in my TRA file (no need for a concluding ^ if it's the only line). So why do I see a mesmerizing shade of blue instead?



#2 temnix

temnix
  • Member
  • 983 posts

Posted 14 January 2018 - 12:09 PM

Rrr. Doesn't anybody know why the colors behave this way? If I could at least understand what to change in that code, 0xfff00c24, to move it towards red... Or is there a table of these codes used for font? A 2DA?



#3 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 14 January 2018 - 12:25 PM

ARGB colors. So one byte(0x00 - 0xff ) is red, one is blue and yet another is green, while the last is the gray balance. Which is which, I don't really care. But try and set 0x00000000, 0xff000077, 0x00ff0077, 0x0000ff77 and so forth until 0x000077ff and you should find which is which. Also do this in an EE game as the original game doesn't support the whole palette space. This forum has simular system if you care to know, as this code:
[color=#00ffff]fsdlkjflijerpi.  [/color]
prints out as: fsdlkjflijerpi. But it might be different between the http coding and in game.

Edited by The Imp, 14 January 2018 - 12:37 PM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#4 temnix

temnix
  • Member
  • 983 posts

Posted 17 January 2018 - 01:39 PM

Will try.

 

Okay. You told me the solution, Imp, so you deserve to be told. The engine uses the Red, Green, Blue scheme in reverse: first two symbols for luminosity, then B, G and R. And thanks.


Edited by temnix, 17 January 2018 - 02:32 PM.


#5 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 18 January 2018 - 12:04 AM

So technically it's a ABGR or as in 0xaabbggrr.
I had something like that in my previous notes, but this will make it clear.

Edited by The Imp, 18 January 2018 - 12:06 AM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.