vuo.color

These nodes are for working with colors.

A color can be described in two different ways by these nodes: HSL (hue, saturation, lightness) or RGB (red, green, blue). In each case, the color is described by a group of three numbers, with each number between 0 and 1.

For HSL, the first number represents the hue, the second number represents the saturation, and the third number represents the lightness. For example, bright red has a hue of 0, a saturation of 1, and a lightness of 0.5.

For RGB, the first number represents the amount of red, the second number represents the amount of green, and the third color represents the amount of blue. For example, bright red has a red value of 1, a green value of 0, and a blue value of 0. The red, green, and blue components of an RGB color are combined additively, so the result is like mixing light (as opposed to mixing paints). For example, a color with a red value of 1, a green value of 1, and a blue value of 0.5 would be pale yellow (not dark brown).

The HSL color model is closer to how people typically think about colors. The RGB color model is often used to represent colors on a computer.

These nodes treat colors the same regardless of whether they were created using HSL or RGB. For example, you can connect the output port of a `Make HSL Color` node to any input port that accepts a color, including a `Get RGB Color Values` node.

In addition to the three numbers representing HSL or RGB, a color can be described by a fourth number representing its opacity (also known as alpha). This number also ranges from 0 to 1, with 1 being fully opaque and 0 being fully transparent.

Example compositions:

• Average Colors: Displays the average color that falls between a chosen color and each of red, green, and blue.
• Change Saturation And Lightness: Displays colors of different hues and varies their saturation and lightness as the mouse moves.
• Pick Color: Samples a color from an image, then displays that color's hexadecimal value in a preview well.

Nodes:

• Average Colors (vuo.color.average): Finds the average of the given colors.
• Blend Colors (vuo.color.blend): Blends two colors into a single color.
• Convert DMX to Color List (vuo.color.dmx.list): Given a list of channel intensity values (received from a DMX device using the Receive Art-Net Messages node), creates a list of colors.
• Get Hex Color Value (vuo.color.get.hex): Gives the hexadecimal color code representation of a color.
• Get HSL Color Values (vuo.color.get.hsl): Gives the HSLA (hue, saturation, lightness, alpha/opacity) values of a color.
• Get RGB Color Values (vuo.color.get.rgb): Gives the RGBA (red, blue, green, alpha/opacity) components of a color.
• Convert Color List to DMX (vuo.color.list.dmx): Given a list of colors, creates a list of channel intensity values which can be sent to a DMX device using the Send Art-Net Messages node.
• Make Hex Color (vuo.color.make.hex): Creates a color from a hexadecimal color code.
• Make HSL Color (vuo.color.make.hsl): Creates a color from HSLA (hue, saturation, lightness, alpha/opacity) values.
• Make RGB Color (vuo.color.make.rgb): Creates a color from RGBA (red, green, blue, alpha/opacity) components.