Author Topic: Color Code X.X  (Read 1185 times)

I want to know TorqueScript's Color Code with thing like 0.0 , 0.8, etc.
How do i use it?

Example from a script:
Code: [Select]
colors[0]        = "0.8 0.8 0.0 0.7";

Color is defined between 0 and 1. The closer to 1, the closer to the color defined. The last number is transparency, I believe.

It goes Red>Green>Blue>Transparency, right?

one question thoguh
« Last Edit: June 17, 2011, 04:30:05 PM by PNetwork2011 »

Color is defined between 0 and 1. The closer to 1, the closer to the color defined. The last number is transparency, I believe.
But how do you Define the color

Red - Blue - Green - Transparency, like he said... Wait, I'm confused. You don't tell the game to do a color, it has it's place. It isn't like forums, where you write "red" or "white" in the field.
« Last Edit: June 17, 2011, 04:33:08 PM by MegaScientifical »

But then how would i make a brown color, for example, with color[] = "";

... Uh... Do you know how colors work at all? Or are you only experienced with typing in color names, and it puts the real color in for you? Think for a moment: You're provided 4 fields where you could insert 3 colors. How do you make brown?

... Uh... Do you know how colors work at all? Or are you only experienced with typing in color names, and it puts the real color in for you?
I know RGB and hexadecimal

Think for a moment: You're provided 4 fields where you could insert 3 colors. How do you make brown?

You know... I'm sure you understand, just... Think about it like that.

... Uh... Do you know how colors work at all? Or are you only experienced with typing in color names, and it puts the real color in for you? Think for a moment: You're provided 4 fields where you could insert 3 colors. How do you make brown?
Here's the catch though: you can only put it from 0.0 - 1.0, right?
If i wanted to use 163 82 0 i cannot just use 163.0,82.0,0.0 because the max is 1.0!

You can look up a converter for this, you know. It's the same thing, but in a different binary.

You can look up a converter for this, you know. It's the same thing, but in a different binary.
Ya but what do i put in the google search bar because "RGB to torque color code converter" is not helping at all

I sort of actually understand now due to this sentence:
1.0 = 255

But i have one thing:

I need exact numbers like 163

RGB to decimal: Divide by 255
Decimal to RGB: Multiply by 255