These forums are CLOSED. Please visit the new forums HERE
Setting which colors will change in a script |
|
|
Rocky Rutabaga
isn't wearing underwear™
Join date: 14 Apr 2006
Posts: 291
|
03-07-2007 05:58
I've got a couple of different freebie color change/generator scripts. However, they run through every color. How can I specify that only a certain set of selected colors will fire? Is there a color chart that lists all the "coordinates" or numbers for the colors so I know which ones are which?
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
03-07-2007 06:31
I've got a couple of different freebie color change/generator scripts. However, they run through every color. How can I specify that only a certain set of selected colors will fire? Is there a color chart that lists all the "coordinates" or numbers for the colors so I know which ones are which? There are a couple of posts that do cover this. try this one |
|
Rocky Rutabaga
isn't wearing underwear™
Join date: 14 Apr 2006
Posts: 291
|
03-07-2007 07:18
Cool. Thanks so much!
|
|
Rocky Rutabaga
isn't wearing underwear™
Join date: 14 Apr 2006
Posts: 291
|
Duh-ee-ah.
03-07-2007 13:28
So where does one put the RGB numbers in the script?
(Sorry, folks. I'm a good builder, I make kick-butt smart alecky T shirts, but I'm all thumbs when it comes to scripts. If you could make even me understand scripting, you would be a billionaire about now. Which reminds me, has anyone written a "Scripting for Dummies" yet? |
|
Jacques Groshomme
Registered User
Join date: 16 Mar 2005
Posts: 355
|
03-07-2007 15:58
LSL treats colors as vectors to represent the three parts of R, G, and B.
Traditional RGB values go from 0 to 255 for each third. In LSL you have to convert to decimal form by dividing each part by 255. To convert from LSL back to RGB, just multiply each part by 255. By doing that: white (normally 255,255,255) becomes <1.0, 1.0, 1.0> black (normally 0,0,0) becomes <0.0, 0.0, 0.0> grey (normally 128,128,12 becomes <0.5, 0.5, 0.5>red (normally 255,0,0) becomes <1.0, 0.0, 0.0> green (normally 0,255,0) becomes <0.0, 1.0, 0.0> blue (normally 0,0,255) becomes <0.0, 0.0, 1.0> These conversions are what is being represented in the long list in the link given to you above. Without looking at your particular script, I couldn't tell you more about what exact changes you are looking to make. |
|
Sterling Whitcroft
Registered User
Join date: 2 Jul 2006
Posts: 678
|
03-07-2007 16:42
Hiya, Rocky!
Try HERE for more info: http://www.lslwiki.net/lslwiki/wakka.php?wakka=color This won't answer ALL your questions, but it shows color swatches and the vector that defines them. And there's a 'function' that will convert from traditional RGB values to the SL equivalent. ==== Edit: /327/20/138429/1.html is another huge list o' colors ![]() |
|
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
|
03-07-2007 17:29
this is a widget that i made back when .... its old its simple and it works
CODE
drop this script into a prim, now whenever you choose a new color using SL's color picker (in the edit window) it will tell you the vector value, ready for copy out of the chat history and paste into your scripts besides giving you the full 16 million color spectrum, its alot quicker than digging tru a ginormous list, or doing basic math ![]() |
|
Rocky Rutabaga
isn't wearing underwear™
Join date: 14 Apr 2006
Posts: 291
|
03-07-2007 18:08
Thanks for your patience and help (not necessarily in that order.) Here's the script I have.
CODE
So where would I set the RBG coordinates? In the llSetColor? How do I add more than one? I'm truly embarassed by my ignorance. But I do appreciate any pity you can bestow. |
|
Sheridan Otoole
Nomadic Merchant
Join date: 6 Jan 2007
Posts: 9
|
03-07-2007 18:54
CODE
So where would I set the RBG coordinates? In the llSetColor? How do I add more than one? I'm truly embarassed by my ignorance. But I do appreciate any pity you can bestow. The line that sets your color is the one that starts "llColor", but this script has the three-part vector filled by the llFrand function, which picks a random decimal between zero and one. So your script isn't picking from a list of colors you would be able to edit/pick/choose, but is rather casting dice which covers the full 16 million color choices available. If you only want it to choose from a few colors each time is cycles its color, that would need some more intense code rewriting. _____________________
"Any sufficiently advanced technology is indistinguishable from magic" -- Arthur C. Clarke
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
03-08-2007 01:46
Try the following
CODE
|