Unofficial LSL Reference

[[functions:llsetcolor]]


Unofficial LSL reference

User Tools

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

Forgotten your password? Get a new one: Set new password

This is an old revision of the document!


Function: llSetColor

llSetColor(vector color, integer face)

Parameters

color

is an SL color vector (3 RGB values in the range 0.0 to 1.0)

face

is an integer defining which face of the prim will have its color set. The special value ALL_SIDES selects every face of the prim.

Notes

  • The function fails silently if 'face' indicates a non-existent face.

Short examples

llSetColor(<0.5, 0.5, 0.5>, 3); // will set face 3 of the prim to grey

Complete examples

llSetColor-example.lsl
default
{
    state_entry()
    {
       // This example takes a color vector in  RGB values (3 values in the range 0 to 255) and applies it to all sides of the current prim
        llSetColor( <128, 240, 96> / 255, ALL_SIDES);
    }
}

See also

  • llSetLinkColor to set the color on any chosen prim in the current object.