Functions
color.a()
Reads the opacity of a colour. Reading is asymmetric with writing: this one returns a fraction from 0 to 1, while the three component functions return whole numbers from 0 to 255.
Syntax · 1 of 4
color.a(const color color) → const float
Arguments
color required const color Return Type
const float Syntax · 2 of 4
color.a(input color color) → input float
Arguments
color required input color Return Type
input float Syntax · 3 of 4
color.a(simple color color) → simple float
Arguments
color required simple color Return Type
simple float Syntax · 4 of 4
color.a(series color color) → series float
Arguments
color required series color Return Type
series float Example
//@lipi=2
indicator("color.a Example", overlay=false)
c = color.new(color.green, 0.4)
plot(color.a(c), title="Opacity (0.4)", color=color.green)