# Change color light in Node red

**URL:** https://discourse.nodered.org/t/change-color-light-in-node-red/16733
**Category:** General
**Created:** [15 October 2019 13:36 UTC](https://discourse.nodered.org/t/change-color-light-in-node-red/16733 "2019-10-15T13:36:42Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Jvdm](https://avatars.discourse-cdn.com/v4/letter/j/ac8455/32.png) [@Jvdm](https://discourse.nodered.org/u/Jvdm)
#### Post date: [15 October 2019 13:36 UTC](https://discourse.nodered.org/t/change-color-light-in-node-red/16733/1 "2019-10-15T13:36:42Z")

</div>

Hello there working with node red the couple of days. But i was searching for a tutorial for lighting and change te light (brightness color light and that things). Where can i change that? i want to change this light red? How do i do that? I use hue magic on node red

```auto

[{"id":"6c9d3bfe.804c54","type":"switch","z":"38ce27be.2cd0b","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":250,"y":80,"wires":[["c65e726c.15cf","52571be0.e48d6c"],["c65e726c.15cf"]]},{"id":"5f46a1c.7931ee","type":"api-call-service","z":"38ce27be.2cd0b","name":"Off","server":"28028217.1461ee","version":1,"service_domain":"light","service":"turn_off","entityId":"light.keuken_2","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":120,"wires":[[]]},{"id":"c65e726c.15cf","type":"stoptimer","z":"38ce27be.2cd0b","duration":"20","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":380,"y":180,"wires":[["5727292e.054cb8"],[]]},{"id":"52571be0.e48d6c","type":"api-current-state","z":"38ce27be.2cd0b","name":"Al aan","server":"28028217.1461ee","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.keuken_2","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":410,"y":40,"wires":[["324407d2.1c7958"]]},{"id":"5727292e.054cb8","type":"api-current-state","z":"38ce27be.2cd0b","name":"Motion","server":"28028217.1461ee","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.keuken_motion","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":570,"y":180,"wires":[["5f46a1c.7931ee"]]},{"id":"324407d2.1c7958","type":"hue-light","z":"38ce27be.2cd0b","name":"Keuken","bridge":"378c6f34.e094","lightid":"6","colornamer":true,"x":620,"y":40,"wires":[[]]},{"id":"28028217.1461ee","type":"server","z":"","name":"Home Assistant"},{"id":"378c6f34.e094","type":"hue-bridge","z":"","name":"Hue Bridge","bridge":"192.168.2.7","key":"xSYLYRm6tIRvnIQCYziAy7CHN-vIQTElkhEP2jGL","interval":"3000"}]

```

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [15 October 2019 13:48 UTC](https://discourse.nodered.org/t/change-color-light-in-node-red/16733/2 "2019-10-15T13:48:03Z")

</div>

Your flow doesn't appear to contain anything where you are trying to set a colour.  
Have you read the ReadMe for the node you are using ( see [flows.nodered.org](http://flows.nodered.org))

It contains the details of the many different ways you can change a bulb to red  
which include sending `msg.payload.color = red`;

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [15 October 2019 13:49 UTC](https://discourse.nodered.org/t/change-color-light-in-node-red/16733/3 "2019-10-15T13:49:21Z")

</div>

See [documentation](https://flows.nodered.org/node/node-red-contrib-huemagic).

Also note that you can select the node itself and in the "info" panel, lots of information is given how to do this.

---

<div class="post-metadata">

### Author: ![Jvdm](https://avatars.discourse-cdn.com/v4/letter/j/ac8455/32.png) [@Jvdm](https://discourse.nodered.org/u/Jvdm)
#### Post date: [15 October 2019 13:53 UTC](https://discourse.nodered.org/t/change-color-light-in-node-red/16733/4 "2019-10-15T13:53:29Z")

</div>

I saw the documentation and saw the info, but the question is where do i put the lines of brightness and color change? In the particulairy flow, in what section do i have to put this...

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [15 October 2019 14:01 UTC](https://discourse.nodered.org/t/change-color-light-in-node-red/16733/5 "2019-10-15T14:01:31Z")

</div>

In a message that is sent to the node it suggests. You can create the message in a function node or a change node

---

<div class="post-metadata">

### Author: ![Jvdm](https://avatars.discourse-cdn.com/v4/letter/j/ac8455/32.png) [@Jvdm](https://discourse.nodered.org/u/Jvdm)
#### Post date: [15 October 2019 14:02 UTC](https://discourse.nodered.org/t/change-color-light-in-node-red/16733/6 "2019-10-15T14:02:27Z")

</div>

I figured it out using a function node Thanx !!!!

---

<div class="post-metadata">

### Author: ![Jvdm](https://avatars.discourse-cdn.com/v4/letter/j/ac8455/32.png) [@Jvdm](https://discourse.nodered.org/u/Jvdm)
#### Post date: [15 October 2019 14:08 UTC](https://discourse.nodered.org/t/change-color-light-in-node-red/16733/7 "2019-10-15T14:08:49Z")

</div>

Brightness is done... But now struggeling with the color... The color wont change to blue.. What do i wrong ?

msg.payload={  
"on":true,  
"brightness":80,  
"color":blue

};  
return msg;

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [15 October 2019 14:09 UTC](https://discourse.nodered.org/t/change-color-light-in-node-red/16733/8 "2019-10-15T14:09:21Z")

</div>

Read the documentation. in your example blue is value and not a string.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [15 October 2019 14:11 UTC](https://discourse.nodered.org/t/change-color-light-in-node-red/16733/9 "2019-10-15T14:11:47Z")

</div>

HINT: Ask yourself, how do I send a string?

---

<div class="post-metadata">

### Author: ![fnees](https://avatars.discourse-cdn.com/v4/letter/f/e56c9b/32.png) [@fnees](https://discourse.nodered.org/u/fnees)
#### Post date: [16 August 2020 20:27 UTC](https://discourse.nodered.org/t/change-color-light-in-node-red/16733/10 "2020-08-16T20:27:16Z")

</div>

People have a lot of attitude in this forum heh?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [16 August 2020 20:36 UTC](https://discourse.nodered.org/t/change-color-light-in-node-red/16733/11 "2020-08-16T20:36:52Z")

</div>

Hi @fnees, welcome to the forum,

forgive me, but that isnt really a great first post 😕

Sometimes people get frustrated (me included) and write things that might seem like "attitude" but I can tell you this much, I dont think I have ever been a member of a more helpful forum. **Ever**.

The amount of time some of the regulars put in helping out folk who either dont RTM or dont bother to try themselves is outstanding. Take a look for yourself, I would guess that 99% of the threads are responded to with either a solution or a hint, without a sniff of attitude.

When you yourself have and issue and start a thread, you will find the people here are truly amazing.

Also, i must point out, that sometimes this "attitude" is merely a thinly veiled attempt at pushing the OP to look into things for themselves (its the best way to _really_ learn)

---

<div class="post-metadata">

### Author: ![ygreq](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ygreq/32/28844_2.png) [@ygreq](https://discourse.nodered.org/u/ygreq)
#### Post date: [19 September 2020 13:47 UTC](https://discourse.nodered.org/t/change-color-light-in-node-red/16733/12 "2020-09-19T13:47:20Z")

</div>

How did you get the brightness done? Can you share the flow, please?
