Author Topic: colorShiftColor problem  (Read 937 times)

So in a weapon script, the code reads as this:
colorShiftColor = "0.400 0.196 0 1.000";

I understand this is an RGB colour code, but how will it translate if I want to change the colour to RGB code 64, 64, 64?

colorShiftColor = "64 64 64"; ????


I hope you understand what I am talking about because I dont even know what I'm talking about.

You could always try it. But I don't think it will work. It has been my experience that while color sets take the 0-1 and 0-255 scales equally, not much in the game will accept more than one method of defining color.

Use 0.25 0.25 0.25 1.00 instead.

There was one function to convert Hex to RGB but I forgot what it was.
forget, one of the add-ons I have definitely had something like that. I guess it's time to dig some!

You could always try it. But I don't think it will work. It has been my experience that while color sets take the 0-1 and 0-255 scales equally, not much in the game will accept more than one method of defining color.

Use 0.25 0.25 0.25 1.00 instead.

So what would I change the following to?

183 99 44
128 128 128
64 64 64
196 196 196
235 202 63


I want to make five variants so I need all of them :/

Okay I got it lol.
It's simple, just divide these numbers by 255 and round out the result to get your colorshift.

So what would I change the following to?

183 99 44
128 128 128
64 64 64
196 196 196
235 202 63


I want to make five variants so I need all of them :/
Devide every value by 255 and put an additional 1 at the end, like this for the first one: 0.717 0.388 0.172 1.000

Quote
183 99 44
128 128 128
64 64 64
196 196 196
235 202 63

0.717 0.388 0.172 1.000
0.501 0.501 0.501 1.000
0.250 0.250 0.250 1.000
0.768 0.768 0.768 1.000
0.921 0.792 0.247 1.000

This should be correct colors?

Okay thanks guys, locking.