> For the complete documentation index, see [llms.txt](https://www.openhue.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.openhue.io/cli/commands/lights.md).

# Lights

## Get Lights

Display one or many lights.&#x20;

### Usage

```
openhue get light [lightId|lightName] [flags]
```

Aliases: `light`, `lights`

### Flags

<table><thead><tr><th width="103">Name</th><th width="114">Shorthand</th><th width="111">Default</th><th>Usage</th></tr></thead><tbody><tr><td>room</td><td>r</td><td></td><td>Filter lights by room (name or ID).</td></tr><tr><td>json</td><td>j</td><td><code>false</code></td><td>Format output as JSON</td></tr></tbody></table>

### Examples

```
# List all lights as a table
openhue get lights

# List all lights as JSON
openhue get lights --json

# Get details for a single light in JSON format
openhue get light aa31ba26-98a7-4830-8ae9-1b7caa8b5700 --json

# Get light by name
openhue get light "Hue Go"

# List all lights for a specific room
openhue get light --room "Living Room"
```

## Set Lights

Control one or many lights

### Usage

```
openhue set light [lightId|lightName] [flags]
```

Aliases: `light`, `lights`

### Flags

<table><thead><tr><th width="142">Name</th><th width="114">Shorthand</th><th width="105">Default</th><th>Usage</th></tr></thead><tbody><tr><td>on</td><td></td><td><code>false</code></td><td>Turn on the light(s)</td></tr><tr><td>off</td><td></td><td><code>false</code></td><td>Turn off the light(s)</td></tr><tr><td>brightness</td><td>b</td><td></td><td>Set the brightness [min=0, max=100]</td></tr><tr><td>color</td><td>c</td><td></td><td>Color name. See <a data-mention href="#available-colors">#available-colors</a></td></tr><tr><td>rgb</td><td></td><td></td><td>RGB hexadecimal value (example <code>#CCE5FF</code>)</td></tr><tr><td>cie-x</td><td>x</td><td></td><td>X coordinate in the CIE color space</td></tr><tr><td>cie-y</td><td>y</td><td></td><td>Y coordinate in the CIE color space</td></tr><tr><td>temperature</td><td>t</td><td></td><td>Color temperature in Mirek [min=153, max=500]</td></tr><tr><td>room</td><td>r</td><td></td><td>Force the room of the light(s) in case multiple lights have the same name but belong to different rooms</td></tr></tbody></table>

### Examples

```
# Turn on a light
openhue set light 15f51223-1e83-4e48-9158-0c20dbd5734e --on

# Turn on multiple lights, using ID or name
openhue set light 83111103-a3eb-40c5-b22a-02deedd21fcb "Hue Play TV" --on

# Turn off a light identified by name in a specific room
openhue set light --room "Living Room" "Hue Play Right" --off

# Set brightness of a single light
openhue set light 15f51223-1e83-4e48-9158-0c20dbd5734e --on --brightness 42.65

# Set color (in RGB) of a single light
openhue set light 15f51223-1e83-4e48-9158-0c20dbd5734e --on --rgb #3399FF

# Set color (in CIE space) of a single light
openhue set light 15f51223-1e83-4e48-9158-0c20dbd5734e --on -x 0.675 -y 0.322

# Set color (by name) of a single light
openhue set light 15f51223-1e83-4e48-9158-0c20dbd5734e --on --color powder_blue

# Set color temperature (in Mirek) of a single light
openhue set light MyLight --on -t 250
```

## Available Colors

* `alice_blue`
* `antique_white`
* `aqua`
* `aqua_marine`
* `azure`
* `beige`
* `bisque`
* `blanched_almond`
* `blue`
* `blue_violet`
* `brown`
* `burly_wood`
* `cadet_blue`
* `chartreuse`
* `chocolate`
* `coral`
* `corn_flower_blue`
* `corn_silk`
* `crimson`
* `cyan`
* `dark_blue`
* `dark_cyan`
* `dark_golden_rod`
* `dark_gray`
* `dark_green`
* `dark_khaki`
* `dark_magenta`
* `dark_olive_green`
* `dark_orange`
* `dark_orchid`
* `dark_red`
* `dark_salmon`
* `dark_sea_green`
* `dark_slate_blue`
* `dark_slate_gray`
* `dark_turquoise`
* `dark_violet`
* `deep_pink`
* `deep_sky_blue`
* `dim_gray`
* `dodger_blue`
* `firebrick`
* `floral_white`
* `forest_green`
* `fuchsia`
* `gainsboro`
* `ghost_white`
* `gold`
* `golden_rod`
* `gray`
* `green`
* `green_yellow`
* `honeydew`
* `hot_pink`
* `indian_red`
* `indigo`
* `ivory`
* `khaki`
* `lavender`
* `lavender_blush`
* `lawn_green`
* `lemon_chiffon`
* `light_blue`
* `light_coral`
* `light_cyan`
* `light_gray`
* `light_green`
* `light_pink`
* `light_salmon`
* `light_sea_green`
* `light_sky_blue`
* `light_slate_gray`
* `light_steel_blue`
* `light_yellow`
* `lime`
* `lime_green`
* `linen`
* `magenta`
* `maroon`
* `medium_aqua_marine`
* `medium_blue`
* `medium_orchid`
* `medium_purple`
* `medium_sea_green`
* `medium_slate_blue`
* `medium_spring_green`
* `medium_turquoise`
* `medium_violet_red`
* `midnight_blue`
* `mint_cream`
* `misty_rose`
* `moccasin`
* `navajo_white`
* `navy`
* `old_lace`
* `olive`
* `olive_drab`
* `orange`
* `orange_red`
* `orchid`
* `pale_golden_rod`
* `pale_green`
* `pale_turquoise`
* `pale_violet_red`
* `papaya_whip`
* `peach_puff`
* `peru`
* `pink`
* `plum`
* `powder_blue`
* `purple`
* `red`
* `rosy_brown`
* `royal_blue`
* `saddle_brown`
* `salmon`
* `sandy_brown`
* `sea_green`
* `sea_shell`
* `sienna`
* `silver`
* `sky_blue`
* `slate_blue`
* `slate_gray`
* `snow`
* `spring_green`
* `steel_blue`
* `tan`
* `teal`
* `thistle`
* `tomato`
* `turquoise`
* `violet`
* `wheat`
* `white`
* `white_smoke`
* `yellow`
* `yellow_green`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.openhue.io/cli/commands/lights.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
