# llSetLinkColor

*LSL function*

```lsl
void llSetLinkColor(integer link, vector color, integer face);
```

- `integer link`: Link number (1 for root, >1 for children) or a LINK_* flag.
- `vector color`: Color vector in RGB <R, G, B> (values from 0.0 to 1.0).
- `integer face`: Face number or ALL_SIDES.

- Energy: 10

If a prim exists in the link set at **link**, set the [Blinn-Phong](https://wiki.secondlife.com/wiki/PBR_Materials#nomenclature-changes) **color** on **face** of that prim.

```lsl title="How to use" frame="terminal"
llSetLinkColor(0, ZERO_VECTOR, 0);
```

## Caveats

- `llSetLinkColor` will have no visible effect on faces with a PBR material. To work on faces both with and without a PBR material, use this snippet:

  ```lsl
  if (llIsLinkGLTFMaterial(LINK_THIS, ALL_SIDES)) {
      llSetLinkGLTFOverrides(LINK_THIS, ALL_SIDES, [OVERRIDE_GLTF_BASE_COLOR_FACTOR, llsRGB2Linear(color)]);
  } else {
      llSetLinkColor(LINK_THIS, color, ALL_SIDES);
  }
  ```

## Examples

<details open>
<summary>Turn a link set green</summary>

```lsl
default
{
    touch_start(integer detected)
    {
        llSetLinkColor(LINK_SET, <0.0, 1.0, 0.0>, ALL_SIDES);
    }
}
```

</details>

## Helper functions

| Color | Hexadecimal code | LSL color representations |
| --- | --- | --- |
| NAVY | #001f3f | `<0.000, 0.122, 0.247>` |
| BLUE | #0074d9 | `<0.000, 0.455, 0.851>` |
| AQUA | #7fdbff | `<0.498, 0.859, 1.000>` |
| TEAL | #39cccc | `<0.224, 0.800, 0.800>` |
| OLIVE | #3d9970 | `<0.239, 0.600, 0.439>` |
| GREEN | #2ecc40 | `<0.180, 0.800, 0.251>` |
| LIME | #01ff70 | `<0.004, 1.000, 0.439>` |
| YELLOW | #ffdc00 | `<1.000, 0.863, 0.000>` |
| ORANGE | #ff851b | `<1.000, 0.522, 0.106>` |
| RED | #ff4136 | `<1.000, 0.255, 0.212>` |
| MAROON | #85144b | `<0.522, 0.078, 0.294>` |
| FUCHSIA | #f012be | `<0.941, 0.071, 0.745>` |
| PURPLE | #b10dc9 | `<0.694, 0.051, 0.788>` |
| WHITE | #ffffff | `<1.000, 1.000, 1.000>` |
| SILVER | #dddddd | `<0.867, 0.867, 0.867>` |
| GRAY | #aaaaaa | `<0.667, 0.667, 0.667>` |
| BLACK | #111111 | `<0.067, 0.067, 0.067>` |

## See also

### Functions

- [llGetAlpha](/functions/llGetAlpha/) — Gets the prim's alpha
- [llSetAlpha](/functions/llSetAlpha/) — Sets the prim's alpha
- [llGetColor](/functions/llGetColor/) — Gets the prim's color
- [llSetColor](/functions/llSetColor/) — Sets the prim's color
- [llSetLinkAlpha](/functions/llSetLinkAlpha/)
- [llSetLinkTexture](/functions/llSetLinkTexture/)
- [PRIM_COLOR](/constants/PRIM_COLOR/) — The equivilant parameter for [llSetPrimitiveParams](https://wiki.secondlife.com/wiki/LlSetPrimitiveParams)
- [PRIM_GLTF_BASE_COLOR](/constants/PRIM_GLTF_BASE_COLOR/) — The equivilant PBR parameter for [llSetPrimitiveParams](https://wiki.secondlife.com/wiki/LlSetPrimitiveParams)

### Events

- [changed](/events/changed/) — [CHANGED_COLOR](/constants/CHANGED_COLOR/)

### Articles

- [Color and Scripting](https://wiki.secondlife.com/wiki/Color_and_Scripting)

---

*Source: [LlSetLinkColor](https://wiki.secondlife.com/wiki/LlSetLinkColor) on the Second Life Wiki. Content from the Second Life Wiki articles LlSetLinkColor (revision 1218719, 2026-03-22), Template:LSL Function/color (revision 1168815, 2012-06-11) and Template:LSL Function/link-face (revision 1186827, 2014-01-12), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llSetLinkColor/
