Difference between revisions of "Template:Darwin's Scripts"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 38: Line 38:
</lsl>
</lsl>
===Color Picker===
===Color Picker===
<lsl>float THRID = 0.333333;
<lsl>float hue = 0.0;
float SIXTH = 0.166666;
 
vector color;
float hue = 0.0;
float lum = 0.5;
float lum = 0.5;
float sat = 1.0;
float sat = 1.0;
Line 115: Line 111:
     {
     {
         start_face = llDetectedTouchFace(0);
         start_face = llDetectedTouchFace(0);
       
         if(start_face == 4)
         if(start_face == 4)
             llOwnerSay((string)hsl_to_rbg(hue, sat, lum));
             llOwnerSay((string)hsl_to_rbg(hue, sat, lum));
Line 124: Line 119:
         vector st = llDetectedTouchST(0);
         vector st = llDetectedTouchST(0);
         integer face = llDetectedTouchFace(0);
         integer face = llDetectedTouchFace(0);
       
         if(start_face != face) return;
         if(start_face != face) return;
       
         if(face == 0)
         if(face == 0)
         {
         {
             sat = st.y;
             sat = st.y;
             hue = st.x;
             hue = st.x;
           
             llSetColor(hsl_to_rbg(hue, sat, lum), 4);
             llSetColor(hsl_to_rbg(hue, sat, lum), 4);
         }
         }
Line 137: Line 129:
         {
         {
             lum = st.x;
             lum = st.x;
           
             llSetColor(hsl_to_rbg(hue, sat, lum), 4);
             llSetColor(hsl_to_rbg(hue, sat, lum), 4);
         }
         }

Revision as of 15:00, 26 November 2008


{{Darwin's Scripts|script name}}

Returns lsl scripts

Contents:

  • find screen width
  • color picker