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

Function: llSetColor

llSetColor(vector color, integer face)

Sets the color of a face or all faces in the current prim.

Parameters

color

A LSL color vector (3 comma-separated RGB values in the range 0.0 to 1.0, between angle brackets)

face

An integer value defining the face of the prim to be affected. ALL_SIDES affects all faces.

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