Function Block UINT2COLOR

The Function Block UINT2COLOR combines the proportions of all primary colors into an RGB value.

Input R

Expects the color Red as integer between 0 to 255. If the value is outside of this range, it will be counted through (Modulo). For example, 256 becomes 0.

Input G

Expects the color Green as integer between 0 to 255. If the value is outside of this range, it will be counted through (Modulo). For example, 256 becomes 0.

Input B

Expects the color Blue as integer between 0 to 255. If the value is outside of this range, it will be counted through (Modulo). For example, 256 becomes 0.

Input A

Expects an Alpha channel as integer between 0 to 255. If the value is outside of this range, it will be limited. If the input is equal to NULL or not used, no Alpha channel will be added to output #RGBA.

Tip: The Alpha channel is also compatible with RGBW signals.

Output #RGBA

Returns the calculated color as a string in format '#RRGGBB' or if an Alpha channel is defined '#RRGGBBAA'.

See Also