Rgb

conversion-functions rgb

syntax

  • rgb(red, green, blue)

definition

rgb(red, green, blue) function results in a uint32 rgb color value with the data items: red, green and blue representing the red, green and blue aspects of the rgb value.

applies to

  • data items with (u)int8, (u)int16 or (u)int32 value-type

conditions

  1. data items red, green and blue need to match with regard to their domain-unit (literals or parameters can be used with data items of any domain).

example

parameter<uint8>  red   := uint8(254);
parameter<uint8>  green := uint8(128);
parameter<uint8>  blue  := uint8(  0);

parameter<uint32> rgb   := rgb(red, green, blue);

result = parameter rgb with rgb value: 254,128,0 (orange)