Skip to content

Relative Color Values

verybadsoldier edited this page Oct 30, 2019 · 2 revisions

Instead of using absolute values for color targets also relative values can be used. Relative values start with the characters + or -. Hue values will be mapped to a circle. When sending a hue value of +40 with a current hue of 340 will result in a target hue of 20. Saturation and brightness values will be capped to values of 0 to 100.

Also it is recommended to use hue values in the range 0 to 359 since relative values are converted into absolute values when the command is executed. This means that a hue value of e.g. +360 will result in the same target hue value as the current value is. So this will have no effect. Using +410 is the same as using +50.

Example:

{ "hsv" : { "h" : "+45", "v" : 70 } }

This would increase the current hue value by +45 and set the brightness to 70. The saturation value won't be affected.