Lipi Reference Lipi

Functions

color.new()

Takes a colour and an opacity, and returns that colour at that opacity. Opacity runs from 0 to 1, where 1 is solid and 0 invisible. A value outside the range is clamped to it rather than rejected, so an out-of-range number neither fails the script nor warns you.

Syntax · 1 of 4

                color.new(const color color, const float alpha) → const color
              

Arguments

color required const color the colour to set an opacity on
alpha required const float the opacity to apply, from 0 to 1

Return Type

const color

Syntax · 2 of 4

                color.new(input color color, input float alpha) → input color
              

Arguments

color required input color the colour to set an opacity on
alpha required input float the opacity to apply, from 0 to 1

Return Type

input color

Syntax · 3 of 4

                color.new(simple color color, simple float alpha) → simple color
              

Arguments

color required simple color the colour to set an opacity on
alpha required simple float the opacity to apply, from 0 to 1

Return Type

simple color

Syntax · 4 of 4

                color.new(series color color, series float alpha) → series color
              

Arguments

color required series color the colour to set an opacity on
alpha required series float the opacity to apply, from 0 to 1

Return Type

series color

Example


          indicator("color.new Example", overlay=true)
c = color.new(color.blue, 70)
bgcolor(c)