Converting RGB to HSV

Hello again, trying to convert RGB to HSV found two nodes which I can't get to one. One is called 'Color Converter' which is suppose to take any color input and return the values of all others. When I try that it gives me the same output as I gave input with no errors. The second one is called 'Color-Convert'. You specify an input type and the output type you want. When using input as RGB and requesting out og HSV it want's the input as an array. Using a debug module I verified my input was an array howerver it gives me an error saying it's not. Any help would be appreciated.

[{"id":"03ac9f8a4a6deca0","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"61d7519e0b341ef0","type":"debug","z":"03ac9f8a4a6deca0","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"rbg_color","targetType":"msg","statusVal":"","statusType":"auto","x":1080,"y":260,"wires":[]},{"id":"1bd29a7dbb7fe978","type":"node-red-contrib-colorspace","z":"03ac9f8a4a6deca0","name":"ColorConvert","target":"payload","x":850,"y":260,"wires":[["61d7519e0b341ef0"]]},{"id":"ce91659ea4e30aec","type":"color-convert","z":"03ac9f8a4a6deca0","input":"rgb","output":"hsv","outputType":"array","scaleInput":false,"x":860,"y":320,"wires":[["61d7519e0b341ef0"]]},{"id":"85d28496a14d1f0d","type":"inject","z":"03ac9f8a4a6deca0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":380,"y":320,"wires":[["c27a5a0b1b42dbf0"]]},{"id":"c27a5a0b1b42dbf0","type":"change","z":"03ac9f8a4a6deca0","name":"","rules":[{"t":"set","p":"rbg_color","pt":"msg","to":"{\"rgb\":[0,255,0]}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":590,"y":320,"wires":[["0b21b8d3f22ab435","ce91659ea4e30aec"]]},{"id":"0b21b8d3f22ab435","type":"debug","z":"03ac9f8a4a6deca0","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"rbg_color","targetType":"msg","statusVal":"","statusType":"auto","x":780,"y":400,"wires":[]}]

I use node-red-contrib-chroma and It should work for this

Here is an example with it:

[{"id":"61d7519e0b341ef0","type":"debug","z":"03ac9f8a4a6deca0","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":570,"y":40,"wires":[]},{"id":"85d28496a14d1f0d","type":"inject","z":"03ac9f8a4a6deca0","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":110,"y":40,"wires":[["c27a5a0b1b42dbf0"]]},{"id":"c27a5a0b1b42dbf0","type":"change","z":"03ac9f8a4a6deca0","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"r\": 0, \"g\": 255, \"b\": 0}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":260,"y":40,"wires":[["0b21b8d3f22ab435","e10d42f1e1a3c39c"]]},{"id":"0b21b8d3f22ab435","type":"debug","z":"03ac9f8a4a6deca0","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":390,"y":120,"wires":[]},{"id":"e10d42f1e1a3c39c","type":"chroma","z":"03ac9f8a4a6deca0","name":"","outFormat":"hsv","array2object":true,"floatOutput":true,"inputRelativeValues":"percent","outputRelativeValues":"percent","x":440,"y":40,"wires":[["61d7519e0b341ef0"]]}]

Its the same as yours but using msg.payload as the variable

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.