Author Topic: Color Conversion  (Read 669 times)

I was recently working with colors in Blockland and for some reason that is beyond me, Torque uses a decimal version of the Hex color system (that's the one with three, sometimes 4 for trans, numbers that can go up to 255). I was trying to get a certain color from my colorset (which DOES use Hex - yay for inconsistency!). To speed things up, I made a standard hex -> whatever blockland uses converter.

Here it is - hope this helps you out!

http://blocksphere.com/bin/converter.php


It's not exactly hard if your computer comes with a calculator. Hex to decimal is dividing with 255 and decimal to hex is multiplying with 255.

It's not exactly hard if your computer comes with a calculator. Hex to decimal is dividing with 255 and decimal to hex is multiplying with 255.
Agreed.

However, with a calculator you'd need to do that four separate times. This makes it much easier.
Additionally, the color code this generates is already in perfect format - you can just copypaste it.

I'm still sticking to my calculator. Faster for me.

I'm still sticking to my calculator. Faster for me.
Fair enough.

I just found it easier to copy paste from a colorset file, then copy the result back into code :)