Colours reference

All 4 colours in AlgoBarsX, each with its parameters, defaults, ranges and an example: rgb, gradient, linear_gradient, radial_gradient.

rgb gradient linear_gradient radial_gradient

rgb(red, green, blue, transparency = 0)→ color#

Color from red, green, blue and optional transparency.

Parameters

NameTypeDefaultRangeWhat it is
redintrequired0 to 255.
greenintrequired0 to 255.
blueintrequired0 to 255.
transparencynumber00 to 100Percent transparent, 0 to 100.
Example
brand = rgb(34, 197, 94)
strategyindicatoralertlibrarysince 1.0

gradient(value, low, high, from = 0, to = 100)→ color#

Color between two colors according to a value.

Parameters

NameTypeDefaultWhat it is
valuenumberrequiredValue to map.
lowcolorrequiredColor at the low end.
highcolorrequiredColor at the high end.
fromnumber0Value mapped to low.
tonumber100Value mapped to high.
Example
heat = gradient(rsi(close, 14), low: red, high: green)
strategyindicatoralertlibrarysince 1.0

linear_gradient(start, end)→ fill#

Linear gradient fill for shapes and channels.

Parameters

NameTypeDefaultWhat it is
startcolorrequiredStart color.
endcolorrequiredEnd color.
Example
shade = linear_gradient(green.fade(60), green.fade(95))
strategyindicatorsince 1.0

radial_gradient(inner, outer)→ fill#

Radial gradient fill for shapes.

Parameters

NameTypeDefaultWhat it is
innercolorrequiredCenter color.
outercolorrequiredEdge color.
Example
glow = radial_gradient(blue, blue.fade(100))
strategyindicatorsince 1.0

Try this in the Terminal. AlgoBars is free: $0 a month, no card needed.

Create my free account