Skip to content

llGetColor

vector llGetColor(integer Face)

Returns the color on Face.

Returns the color of Face as a vector of red, green, and blue values between 0 and 1. If face is ALL_SIDES the color returned is the mean average of each channel.

Parameters
Face (integer)
// Tells the owner the color on all sides
default
{
state_entry()
{
integer i = 0;
integer max = llGetNumberOfSides();
while(i < max)
{
llOwnerSay("Face " + (string) i + " color is " + (string) llGetColor(i));
++i;
}
}
}
  • When face is ALL_SIDES, the returned color is the average of each channel across all faces. Since sRGB is nonlinear, this color may not be particularly meaningful in certain contexts.
  • Returns color as a vector with x, y, z components corresponding to red, green, and blue values between 0.0 and 1.0.