> ## Documentation Index
> Fetch the complete documentation index at: https://www.nexrender.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# nx:solid-color-set

> Sets the color of a solid color layer

Changes the color of solid layers in your composition. You can pass the color as a hex string or an RGB array.

## Examples

### Using RGB array (0-1 range)

```json theme={null}
{
  "type": "function",
  "name": "nx:solid-color-set",
  "params": {
    "layerName": "Background Solid",
    "color": [1, 0.5, 0.2]
  }
}
```

### Using RGB array (0-255 range)

```json theme={null}
{
  "type": "function",
  "name": "nx:solid-color-set",
  "params": {
    "layerName": "Background Solid",
    "color": [255, 128, 51]
  }
}
```

### Using hex color

```json theme={null}
{
  "type": "function",
  "name": "nx:solid-color-set",
  "params": {
    "layerName": "Background Solid",
    "color": "#ff8033"
  }
}
```

### Targeting specific composition

```json theme={null}
{
  "type": "function",
  "name": "nx:solid-color-set",
  "params": {
    "composition": "Precomp_1",
    "layerName": "Background Solid",
    "color": "#ff8033"
  }
}
```

## Parameters

**layerName** `string | string[]` *required*

Name of the solid layer. Pass an array of names to change several layers.

**color** `array | string` *required*

Color in multiple formats:

* RGB arrays of exactly three numbers: `[1,1,1]` (0-1 range) or `[255,255,255]` (0-255 range). If any value is above 1, all three are read as 0-255.
* Hex strings: `#ffffff` or `#fff`

**composition** `string` (default: null)

Name of the composition (optional). Without it, solid layers with this name in every composition of the project are changed.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.