color.new
Make a colour with a chosen transparency.
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.
| Name | Kind | Type | Default | Range | Description |
|---|---|---|---|---|---|
color | Constant | color | - | - | A named colour or a #rrggbb literal. |
transparency | Constant | number | - | 0 to 100 | 0 is opaque, 100 is invisible. |
Output
| Name | Type |
|---|---|
value | color |
Warm-up and missing values
- Warm-up
- None.
- Missing values
- Total: both arguments are compile-time constants.
Example
color.new(color.blue, 70)plot(close, "Close", color=color.new(color.blue, 70))