Docs

color.new

Make a colour with a chosen transparency.

itm
color.new(color, transparency)

A colour with transparency applied, as #rrggbbaa.

Parameters

A series parameter takes a value on every bar. A constant parameter must be known before the first bar, such as a number or an input.

NameKindTypeDefaultRangeDescription
colorConstantcolor--A named colour or a #rrggbb literal.
transparencyConstantnumber-0 to 1000 is opaque, 100 is invisible.

Output

NameType
valuecolor

Warm-up and missing values

Warm-up
None.
Missing values
Total: both arguments are compile-time constants.

Example

itm
color.new(color.blue, 70)
itm
plot(close, "Close", color=color.new(color.blue, 70))