LSL Color There’s some info on color vectors. You know how scripts have sometimes for coloring, maybe for your particles (Or something a bit like that hehe)

It’s easier than I thought it’d be.

Here’s how to convert from RGB to the vector colors needed for scripts. I found it during some Googling tonight and thought I’d share! :)

Let’s practice! You’ll need to be able to rez a prim and maybe open your calculator if you’re too tired to work out the math in your head. It’s okay if you need to use it, I used one too hehe

Rez a prim

Make the texture blank

Then open the color picker box on the texture tab.

Find a color and then look there at the RGB in the upper left corner of the color picking window.

Go ahead and choose white for the purpose of this quick lesson. :)

You should see this now:

Red: 255

Green: 255

Blue 255

Now let’s turn it into a vector. For each number there, divide it by 255. First the one by the word “Red”, then the one by the word “Green” and again for the number by the word “Blue”

Then keep them in that order!

You get:

1

1

1

Yes? Yup!

Pick another color and try again! If you want to follow along again, I happen to like the red that has the RGB of:

Red: 128

Green: 0

Blue: 0

Okay now we’ll start with the top one, 128 divided by 255 is around abouts 0.5 (there’s a bunch of numbers after but tonight I rounded everything to either one or two numbers after the decimal)

Then we go to the next number of 0. zero divided by 255 is zero.

The third number is also a zero, again divided by 255 is still zero.

So what you have for your script for that shade of red is

0.5, 0, 0

Do you see?

Let’s do one more color!

Enter this into the color picker numbers for the RGB:

Red: 0

Green: 128

Blue: 255

Same thing, zero divided by 255 is 0

128 divided by 255 is around 0.5

255 divided by 255 is one

So now you have 0, 0.5, 1

Spectacular :) Now you’re all set to convert your favorite colors into your favorite particle scripts! Good for you! *high paw*

Hopefully my math is right!

W00T Lori! I came here through Google (hehe what are the odds!) and this was exactly what I needed! And yes, it works! :o]