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
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
red | int | required | 0 to 255. | |
green | int | required | 0 to 255. | |
blue | int | required | 0 to 255. | |
transparency | number | 0 | 0 to 100 | Percent transparent, 0 to 100. |
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
| Name | Type | Default | What it is |
|---|---|---|---|
value | number | required | Value to map. |
low | color | required | Color at the low end. |
high | color | required | Color at the high end. |
from | number | 0 | Value mapped to low. |
to | number | 100 | Value mapped to high. |
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
| Name | Type | Default | What it is |
|---|---|---|---|
start | color | required | Start color. |
end | color | required | End color. |
shade = linear_gradient(green.fade(60), green.fade(95))strategyindicatorsince 1.0
radial_gradient(inner, outer)→ fill#
Radial gradient fill for shapes.
Parameters
| Name | Type | Default | What it is |
|---|---|---|---|
inner | color | required | Center color. |
outer | color | required | Edge color. |
glow = radial_gradient(blue, blue.fade(100))strategyindicatorsince 1.0