Lipi Reference Lipi

Functions

color.rgb()

Builds a colour from red, green and blue components, with an optional opacity. Two scales meet in one call: the components run from 0 to 255 and the opacity from 0 to 1. Leave the opacity out and the colour is solid; components and opacity are both clamped to their range.

Syntax · 1 of 4

                color.rgb(const int r, const int g, const int b, const float a) → const color
              

Arguments

r required const int the red component, from 0 to 255
g required const int the green component, from 0 to 255
b required const int the blue component, from 0 to 255
a const float optional; the opacity, from 0 to 1, defaulting to solid

Return Type

const color

Syntax · 2 of 4

                color.rgb(input int r, input int g, input int b, input float a) → input color
              

Arguments

r required input int the red component, from 0 to 255
g required input int the green component, from 0 to 255
b required input int the blue component, from 0 to 255
a input float optional; the opacity, from 0 to 1, defaulting to solid

Return Type

input color

Syntax · 3 of 4

                color.rgb(simple int r, simple int g, simple int b, simple float a) → simple color
              

Arguments

r required simple int the red component, from 0 to 255
g required simple int the green component, from 0 to 255
b required simple int the blue component, from 0 to 255
a simple float optional; the opacity, from 0 to 1, defaulting to solid

Return Type

simple color

Syntax · 4 of 4

                color.rgb(series int r, series int g, series int b, series float a) → series color
              

Arguments

r required series int the red component, from 0 to 255
g required series int the green component, from 0 to 255
b required series int the blue component, from 0 to 255
a series float optional; the opacity, from 0 to 1, defaulting to solid

Return Type

series color