palette
Named colour sets the member can pick and edit (input.palette, palette.get).
#Functions
#palette.getfunction
One colour of a palette by its key (na when the key is missing).
palette.get(palette: string, key: string): color| Parameter | Type | Description |
|---|---|---|
palette | string | A palette (palette.new or input.palette). |
key | string | The colour's key. |
Returns color.
Example
const pro = palette.new("Pro", { bull: #26A69A, bear: #EF5350 })
const p = input.palette(pro, "Palette")
const c = palette.get(p, "bull")Since ChartScript 1
#palette.newfunction
A named palette: the palette's name, then an options object of key: colour pairs ({ bull: #26A69A, bear: #EF5350 ... }).
palette.new(name: const string, colors: const color, …): string| Parameter | Type | Description |
|---|---|---|
name | const string | The name shown to the member. |
colors | const color | key: colour pairs in an options object ({ bull: #26A69A, bear: #EF5350 }). |
Returns string.
Example
const pro = palette.new("Pro", { bull: #26A69A, bear: #EF5350 })
const p = input.palette(pro, "Palette")Since ChartScript 1