Skip to content
lsl.devlsl.devLSL Dev

Color-to-Vector Tool

LSL Header: {{LSL Header}}
Say the Prim's Color Vector
This script is useful as a WYSIWYG color reporter. Each time the prim's color changes, the color vector is chatted to the owner. Note, it reports the color of face 0(zero) by default.
integer FACE = 0;

default {
    changed(integer change) {
        if (change & CHANGED_COLOR) llOwnerSay("Color Vector = " + (string)llGetColor(FACE));
    }
}
This script shows it hovering over the prim as well for less chat spam and longer display value.
default {
    changed(integer change) {
        if (change & CHANGED_COLOR) llSetText("Color Vector = " + (string)llGetColor(0),<1.0,1.0,1.0>,1.0);
    }
}
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.