spacer.png, 0 kB
SL color helper E-mail

vectorcolour.jpgfree sl script will let you edit color and tells you the vector off the rgb.
you can pick a color or choose to raise/lower one of the rgb channels.
it will update the prim color.
manu based

this script is usefull to get the color vector you need for one of your scripts. 

 

 

 

   

 

///////////////////////////////////////////////////////////////
//////  SCRIPT MADE BY FLATER BAXTER                     //////
//////        FREE TO USE , NOT FOR RESELL :p           ///////
////////          MORE FREE SCRIPTS ON OUR WEBSITE     ////////
////////////            HTTP://WWW.LOOQZ.EU          //////////
//////////////////////////  KEEP THIS TEXT IN PLACE ///////////
///////////////////////////////////////////////////////////////


integer chan;
integer handle1;
key user;

vector colour;
float r;
float g;
float b;
string Clour;
list colours =["red","purple","blue","green","yellow","orange","white","black","pink"];

get_rgb(){
                   
                    list tempc = llCSV2List(llGetSubString((string)colour, 1, 25));
                     r=llList2Float(tempc,0);
                     g=llList2Float(tempc,1);
                     b=llList2Float(tempc,2);
                    
}
set_colour()
{
  Clour = "<"+(string)r+","+(string)g+","+(string)b+">";
                    colour = (vector)Clour;
                    llSetText((string)colour,colour,1);
                    llDialog(user,"\n colour: "+ (string)colour+" \n  \n",["r-","g-","b-","r+","g+","b+","colours","done","chat"],chan);
                    llSetColor(  colour, ALL_SIDES ); 
}
set_colour2()
{
 
                    llSetText((string)colour,colour,1);
                    llDialog(user,"\n colour: "+ (string)colour+" \n  \n",["r-","g-","b-","r+","g+","b+","colours","done","chat"],chan);
                    llSetColor(  colour, ALL_SIDES );
                    llSetText((string)colour,colour,1); 
}


default
{
    state_entry()
    {
        colour = llGetColor( ALL_SIDES );
         get_rgb();
    
    }
    on_rez(integer start_param)
    {
          llResetScript(); 
    } 
    touch_start(integer total_number)
    {
        colour = llGetColor( ALL_SIDES );
        get_rgb();
        user = llDetectedKey(0);
        chan = llFloor(llFrand(9999));
        if(chan <= 5)chan = llFloor(llFrand(9999));
        llDialog(user,"\n colour: "+ (string)colour+" \n  \n",["r-","g-","b-","r+","g+","b+","colours","done"],chan);
        llListenRemove(handle1);
        handle1=llListen(chan,"",llGetOwner(),"");
       
   
    }
     listen( integer channel, string name, key id, string message )
    {
                   
       
                    
                    if (message == "r+") {get_rgb(); if(r>=1.0)r=1.0;else r += 0.05;
                    set_colour();}
                   
                    if (message == "r-") {get_rgb(); if(r<=0.0)r=0.0;else r -= 0.05;
                    set_colour();}
                   
                    if (message == "g+") {get_rgb(); if(g>=1.0)g=1.0;else g += 0.05;
                    set_colour();}
                   
                    if (message == "g-") {get_rgb(); if(g<=0.0)g=0.0;else g -= 0.05;
                    set_colour();}
                   
                     if (message == "b+") {get_rgb(); if(b>=1.0)b=1.0;else b += 0.05;
                    set_colour();}
                   
                    if (message == "b-") { get_rgb();if(b<=0.0)b=0.0;else b -= 0.05;
                    set_colour();}
                    if (message == "colours")llDialog(user,"\n colour: "+ (string)colour+" \n  \n",colours,chan);
                   
                    if (message == "red"){;colour=<1,0,0>;set_colour2();}
                   
                    if (message == "purple"){colour=<0.3,0,0.5>;set_colour2();}
                   
                    if (message == "blue"){colour=<0.0,0,1.0> ;set_colour2();}
                   
                    if (message == "green"){colour=<0,1,0>;set_colour2();}
                   
                    if (message == "yellow"){colour=<1.0,1.0,0>;set_colour2();}
                   
                    if (message == "orange"){colour=<1,0.3,0>;set_colour2();}
                   
                    if (message == "black"){colour=<0,0,0>;set_colour2();}
                   
                    if (message == "white"){colour=<1,1,1>;set_colour2();}
                   
                    if (message == "pink"){colour=<0.7,0,0.9>;set_colour2();}
                    if (message == "chat")llSay(0,(string)colour);
                   
           
            }
}

 

 

 
Comments
Add comments: SL color helper

Enter your comment below:

(required)

(required)

Your email will not be displayed on the site; only to our administrator.





 

free lindens
 
spacer.png, 0 kB
   
free joomla templates Joomla tutorials joomla themes