View Full Version : rgb2bgr Converter

08-14-2006, 01:23 PM
BGR (Blue, Green, Red) is an alternate arrangement of the RGB color model. It is used in KotOR area files (*.are) to define some colors <- will clarify this later.
So I made this web page (http://www.sudop.cz/kotor/rgb2bgr/rgb2bgr.php), which converts RGB values or Hex code of color into BGR value and backwards.

It can convert:

RGB to Hex/BGR
Hex to RGB/BGR
BGR to RGB/Hex

You don't really need this, if you have the right knowledge and some calculator capable of decimal to hexadecimal (and backwards) conversion.

BGR = (Blue * 65536) + (Green * 256) + Red
BGR = take hexadecimal code of color, switch its Red and Blue values 123456 -> 563412 and convert it to decimal

08-15-2006, 11:04 AM
I would say that even with a working hex knowledge this utlity is good to have handy as untill you brought it up just now I don't think anybody knew that the RGB colors were backwards in the ARE file. Or if people did they just haven't mentioned it anywhere.

08-16-2006, 02:40 AM
I think people did (it's written in BioWare documentation). I brought it up, because there could be some possibility to change an area to look like at night. So far I got these images (http://kaspian.fotopic.net/c1053869.html). It is also possible to change area model's textures. And the Sun will be conquered one day :)

08-16-2006, 03:24 PM
Well the Bioware's documentation covers alot of elements that aren't in the Kotor games. That's probably why it doesn't get noticed by Kotor modders like me.