--- tag: m0150 title: Set RGB(W) Color brief: Set the color of the RGB(W) LED, backlight, or LED strip. author: thinkyhead requires: BLINKM|RGB_LED|RGBW_LED|NEOPIXEL_LED|PCA9632 group: lcd codes: [ M150 ] notes: Requires `BLINKM`, `RGB_LED`, `RGBW_LED`, `NEOPIXEL_LED` or `PCA9632`. parameters: - tag: R optional: true description: Red component from 0 to 255 values: - tag: intensity type: byte - tag: U optional: true description: Green component from 0 to 255 values: - tag: intensity type: byte - tag: B optional: true description: Blue component from 0 to 255 values: - tag: intensity type: byte - tag: W optional: true description: White component from 0 to 255 (`RGBW_LED` or `NEOPIXEL_LED` only) values: - tag: intensity type: byte - tag: P optional: true requires: NEOPIXEL_LED description: Brightness from 0 to 255 (Requires `NEOPIXEL_LED`) values: - tag: intensity type: byte - tag: I since: 2.0.6 optional: true requires: NEOPIXEL_LED description: NeoPixel pixel index (0 .. pixels-1) (Requires `NEOPIXEL_LED`) values: - tag: pixel type: int - tag: S since: 2.0.6.1 optional: true requires: NEOPIXEL2_SEPARATE description: NeoPixel strip index (0 or 1) (Requires `NEOPIXEL2_SEPARATE`) values: - tag: strip type: int - tag: K optional: true requires: NEOPIXEL_LED description: Keep all unspecified values unchanged (Requires `NEOPIXEL_LED`) values: - type: flag examples: - pre: Set LEDs to blue with brightness 30 code: M150 B30 - pre: Set NeoPixel 0 to red with brightness 100 code: M150 R100 I0 - pre: Set NeoPixel 1 to green with brightness 45 code: M150 U45 I1 - pre: Set the second NeoPixel strip full white code: M150 W255 S1 - pre: Change red to 50% without changing other components code: M150 K R127 --- If you have an RGB(W) light, either as part of a controller or installed separately, the [`M150`](/docs/gcode/M150.html) command can be used to set its color.