Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

color changing

Ikonn Giano
Registered User
Join date: 15 Dec 2007
Posts: 126
03-27-2009 16:44
Hello all I am new to scripting I’m looking for something that is menu driven and will adjust the primary colors red green blue like +R -R +g -g so that you can match the color (tone).
Any help would be greatly appreciated

Thanks
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
03-27-2009 17:04
Just use llSetPrimitiveParams in your script, as in ....

CODE

llSetPrimitiveParams([ PRIM_COLOR, ALL_SIDES, <0, 1, 0>, 1.0]);


in which the third parameter is a vector describing RGB. See .
Ikonn Giano
Registered User
Join date: 15 Dec 2007
Posts: 126
03-27-2009 18:03
Thanks I will check that out but Im looking for more like a sample script to play with .......


but +R -R would add say like +5 to darken the red or -5 to lighten so you could match clothing or even a skin
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
03-28-2009 03:46
here's a place to start /54/68/310835/1.html :)
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-28-2009 11:02
From: Ikonn Giano
Thanks I will check that out but Im looking for more like a sample script to play with .......


but +R -R would add say like +5 to darken the red or -5 to lighten so you could match clothing or even a skin

colors in scripts are scaled 0 to 1.... if you want to convert from web style codes (00 - FF) then divide the web code number by 256 to get the LSL appropriate 0.0 - 1.0, multiply (and convert to hex) to do the reverse (so your color codes can be displayed)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Ikonn Giano
Registered User
Join date: 15 Dec 2007
Posts: 126
03-28-2009 16:26
Is there a way to make a color darker? like if you click red twice it will add more red to the prim if you click blue it adds more blue to darken the color
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
03-28-2009 17:14
color values can be anything from 0 to 1, want the red to be half as bright? use 0.5