Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vector rgbToLsl(float r, float g, float b){
- float finalA;
- float finalB;
- float finalC;
- float percent=r*100/255;
- finalA=(1.0*percent)/100;
- percent=g*100/255;
- finalB=(1.0*percent)/100;
- percent=b*100/255;
- finalC=(1.0*percent)/100;
- return <finalA,finalB,finalC>;
- }
- lslToRgb(vector lsl){
- float finalA;
- float finalB;
- float finalC;
- float result=lsl.x*100;
- finalA=255*result/100;
- result=lsl.y*100;
- finalB=255*result/100;
- result=lsl.z*100;
- finalC=255*result/100;
- llOwnerSay("Lsl "+(string)lsl+" to RGB is <"+(string)finalA+","+(string)finalB+","+(string)finalC+">");
- }
- default{
- state_entry(){
- vector rgb=rgbToLsl(128,109,206);
- llSetColor(rgb,ALL_SIDES);
- llOwnerSay((string)rgb);
- lslToRgb(rgb);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement