oakscriptjs 0.24.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -1
- package/bin/oakscript.mjs +10 -3
- package/dist/cjs/box/index.d.ts +348 -289
- package/dist/cjs/box/index.d.ts.map +1 -1
- package/dist/cjs/box/index.js.map +2 -2
- package/dist/cjs/check/node.d.ts.map +1 -1
- package/dist/cjs/check/node.js +1 -0
- package/dist/cjs/check/node.js.map +2 -2
- package/dist/cjs/check/preview.d.ts +31 -0
- package/dist/cjs/check/preview.d.ts.map +1 -0
- package/dist/cjs/check/preview.js +303 -0
- package/dist/cjs/check/preview.js.map +7 -0
- package/dist/cjs/color/index.d.ts +11 -11
- package/dist/cjs/color/index.js.map +1 -1
- package/dist/cjs/color/parse.d.ts +2 -0
- package/dist/cjs/color/parse.d.ts.map +1 -1
- package/dist/cjs/color/parse.js +6 -0
- package/dist/cjs/color/parse.js.map +2 -2
- package/dist/cjs/compare/index.d.ts +76 -12
- package/dist/cjs/compare/index.d.ts.map +1 -1
- package/dist/cjs/compare/index.js.map +2 -2
- package/dist/cjs/drawing/registry.d.ts +28 -5
- package/dist/cjs/drawing/registry.d.ts.map +1 -1
- package/dist/cjs/drawing/registry.js +14 -0
- package/dist/cjs/drawing/registry.js.map +2 -2
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/label/index.d.ts +265 -187
- package/dist/cjs/label/index.d.ts.map +1 -1
- package/dist/cjs/label/index.js +1 -1
- package/dist/cjs/label/index.js.map +2 -2
- package/dist/cjs/line/index.d.ts +247 -207
- package/dist/cjs/line/index.d.ts.map +1 -1
- package/dist/cjs/line/index.js.map +2 -2
- package/dist/cjs/linefill/index.d.ts +61 -89
- package/dist/cjs/linefill/index.d.ts.map +1 -1
- package/dist/cjs/linefill/index.js.map +2 -2
- package/dist/cjs/math/index.d.ts +49 -40
- package/dist/cjs/math/index.d.ts.map +1 -1
- package/dist/cjs/math/index.js.map +2 -2
- package/dist/cjs/polyline/index.d.ts +57 -78
- package/dist/cjs/polyline/index.d.ts.map +1 -1
- package/dist/cjs/polyline/index.js.map +2 -2
- package/dist/cjs/runtime/input-active.d.ts +2 -2
- package/dist/cjs/runtime/input-active.js.map +1 -1
- package/dist/cjs/runtime/series.d.ts +241 -161
- package/dist/cjs/runtime/series.d.ts.map +1 -1
- package/dist/cjs/runtime/series.js +223 -127
- package/dist/cjs/runtime/series.js.map +2 -2
- package/dist/cjs/script/api/alert.d.ts +37 -0
- package/dist/cjs/script/api/alert.d.ts.map +1 -0
- package/dist/cjs/script/api/alert.js +17 -0
- package/dist/cjs/script/api/alert.js.map +7 -0
- package/dist/cjs/script/api/calc.d.ts +232 -0
- package/dist/cjs/script/api/calc.d.ts.map +1 -0
- package/dist/cjs/script/api/calc.js +17 -0
- package/dist/cjs/script/api/calc.js.map +7 -0
- package/dist/cjs/script/api/color.d.ts +213 -0
- package/dist/cjs/script/api/color.d.ts.map +1 -0
- package/dist/cjs/script/api/color.js +17 -0
- package/dist/cjs/script/api/color.js.map +7 -0
- package/dist/cjs/script/api/context.d.ts +764 -0
- package/dist/cjs/script/api/context.d.ts.map +1 -0
- package/dist/cjs/script/api/context.js +17 -0
- package/dist/cjs/script/api/context.js.map +7 -0
- package/dist/cjs/script/api/log.d.ts +58 -0
- package/dist/cjs/script/api/log.d.ts.map +1 -0
- package/dist/cjs/script/api/log.js +17 -0
- package/dist/cjs/script/api/log.js.map +7 -0
- package/dist/cjs/script/api/strategy.d.ts +391 -0
- package/dist/cjs/script/api/strategy.d.ts.map +1 -0
- package/dist/cjs/script/api/strategy.js +17 -0
- package/dist/cjs/script/api/strategy.js.map +7 -0
- package/dist/cjs/script/api/ta.d.ts +1012 -0
- package/dist/cjs/script/api/ta.d.ts.map +1 -0
- package/dist/cjs/script/api/ta.js +17 -0
- package/dist/cjs/script/api/ta.js.map +7 -0
- package/dist/cjs/script/api/table.d.ts +479 -0
- package/dist/cjs/script/api/table.d.ts.map +1 -0
- package/dist/cjs/script/api/table.js +17 -0
- package/dist/cjs/script/api/table.js.map +7 -0
- package/dist/cjs/script/constants.d.ts +228 -83
- package/dist/cjs/script/constants.d.ts.map +1 -1
- package/dist/cjs/script/constants.js +87 -0
- package/dist/cjs/script/constants.js.map +2 -2
- package/dist/cjs/script/define.d.ts +94 -0
- package/dist/cjs/script/define.d.ts.map +1 -0
- package/dist/cjs/script/define.js +127 -0
- package/dist/cjs/script/define.js.map +7 -0
- package/dist/cjs/script/drawing-args.d.ts.map +1 -1
- package/dist/cjs/script/drawing-args.js +1 -1
- package/dist/cjs/script/drawing-args.js.map +2 -2
- package/dist/cjs/script/formula.d.ts +53 -0
- package/dist/cjs/script/formula.d.ts.map +1 -0
- package/dist/cjs/script/formula.js +402 -0
- package/dist/cjs/script/formula.js.map +7 -0
- package/dist/cjs/script/globals.d.ts +10 -0
- package/dist/cjs/script/globals.d.ts.map +1 -1
- package/dist/cjs/script/globals.js.map +1 -1
- package/dist/cjs/script/index.d.ts +1065 -1006
- package/dist/cjs/script/index.d.ts.map +1 -1
- package/dist/cjs/script/index.js +530 -60
- package/dist/cjs/script/index.js.map +3 -3
- package/dist/cjs/script/json.d.ts +117 -0
- package/dist/cjs/script/json.d.ts.map +1 -0
- package/dist/cjs/script/json.js +321 -0
- package/dist/cjs/script/json.js.map +7 -0
- package/dist/cjs/str/index.d.ts +50 -75
- package/dist/cjs/str/index.d.ts.map +1 -1
- package/dist/cjs/str/index.js +2 -2
- package/dist/cjs/str/index.js.map +2 -2
- package/dist/cjs/strategy/index.d.ts +102 -1
- package/dist/cjs/strategy/index.d.ts.map +1 -1
- package/dist/cjs/strategy/index.js.map +2 -2
- package/dist/cjs/table/index.d.ts +330 -49
- package/dist/cjs/table/index.d.ts.map +1 -1
- package/dist/cjs/table/index.js +55 -27
- package/dist/cjs/table/index.js.map +2 -2
- package/dist/cjs/text/index.d.ts +12 -14
- package/dist/cjs/text/index.d.ts.map +1 -1
- package/dist/cjs/text/index.js.map +2 -2
- package/dist/cjs/types/index.d.ts +15 -8
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +12 -3
- package/dist/cjs/types/index.js.map +2 -2
- package/dist/esm/box/index.d.ts +348 -289
- package/dist/esm/box/index.d.ts.map +1 -1
- package/dist/esm/box/index.js +276 -276
- package/dist/esm/box/index.js.map +1 -1
- package/dist/esm/check/node.d.ts.map +1 -1
- package/dist/esm/check/node.js +1 -0
- package/dist/esm/check/node.js.map +1 -1
- package/dist/esm/check/preview.d.ts +31 -0
- package/dist/esm/check/preview.d.ts.map +1 -0
- package/dist/esm/check/preview.js +296 -0
- package/dist/esm/check/preview.js.map +1 -0
- package/dist/esm/color/index.d.ts +11 -11
- package/dist/esm/color/index.js +11 -11
- package/dist/esm/color/parse.d.ts +2 -0
- package/dist/esm/color/parse.d.ts.map +1 -1
- package/dist/esm/color/parse.js +7 -0
- package/dist/esm/color/parse.js.map +1 -1
- package/dist/esm/compare/index.d.ts +76 -12
- package/dist/esm/compare/index.d.ts.map +1 -1
- package/dist/esm/compare/index.js +76 -12
- package/dist/esm/compare/index.js.map +1 -1
- package/dist/esm/drawing/registry.d.ts +28 -5
- package/dist/esm/drawing/registry.d.ts.map +1 -1
- package/dist/esm/drawing/registry.js +39 -3
- package/dist/esm/drawing/registry.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/label/index.d.ts +265 -187
- package/dist/esm/label/index.d.ts.map +1 -1
- package/dist/esm/label/index.js +207 -177
- package/dist/esm/label/index.js.map +1 -1
- package/dist/esm/line/index.d.ts +247 -207
- package/dist/esm/line/index.d.ts.map +1 -1
- package/dist/esm/line/index.js +202 -194
- package/dist/esm/line/index.js.map +1 -1
- package/dist/esm/linefill/index.d.ts +61 -89
- package/dist/esm/linefill/index.d.ts.map +1 -1
- package/dist/esm/linefill/index.js +61 -89
- package/dist/esm/linefill/index.js.map +1 -1
- package/dist/esm/math/index.d.ts +49 -40
- package/dist/esm/math/index.d.ts.map +1 -1
- package/dist/esm/math/index.js +22 -9
- package/dist/esm/math/index.js.map +1 -1
- package/dist/esm/polyline/index.d.ts +57 -78
- package/dist/esm/polyline/index.d.ts.map +1 -1
- package/dist/esm/polyline/index.js +57 -78
- package/dist/esm/polyline/index.js.map +1 -1
- package/dist/esm/runtime/input-active.d.ts +2 -2
- package/dist/esm/runtime/input-active.js +2 -2
- package/dist/esm/runtime/series.d.ts +241 -161
- package/dist/esm/runtime/series.d.ts.map +1 -1
- package/dist/esm/runtime/series.js +241 -161
- package/dist/esm/runtime/series.js.map +1 -1
- package/dist/esm/script/api/alert.d.ts +37 -0
- package/dist/esm/script/api/alert.d.ts.map +1 -0
- package/dist/esm/script/api/alert.js +7 -0
- package/dist/esm/script/api/alert.js.map +1 -0
- package/dist/esm/script/api/calc.d.ts +232 -0
- package/dist/esm/script/api/calc.d.ts.map +1 -0
- package/dist/esm/script/api/calc.js +6 -0
- package/dist/esm/script/api/calc.js.map +1 -0
- package/dist/esm/script/api/color.d.ts +213 -0
- package/dist/esm/script/api/color.d.ts.map +1 -0
- package/dist/esm/script/api/color.js +6 -0
- package/dist/esm/script/api/color.js.map +1 -0
- package/dist/esm/script/api/context.d.ts +764 -0
- package/dist/esm/script/api/context.d.ts.map +1 -0
- package/dist/esm/script/api/context.js +7 -0
- package/dist/esm/script/api/context.js.map +1 -0
- package/dist/esm/script/api/log.d.ts +58 -0
- package/dist/esm/script/api/log.d.ts.map +1 -0
- package/dist/esm/script/api/log.js +6 -0
- package/dist/esm/script/api/log.js.map +1 -0
- package/dist/esm/script/api/strategy.d.ts +391 -0
- package/dist/esm/script/api/strategy.d.ts.map +1 -0
- package/dist/esm/script/api/strategy.js +7 -0
- package/dist/esm/script/api/strategy.js.map +1 -0
- package/dist/esm/script/api/ta.d.ts +1012 -0
- package/dist/esm/script/api/ta.d.ts.map +1 -0
- package/dist/esm/script/api/ta.js +6 -0
- package/dist/esm/script/api/ta.js.map +1 -0
- package/dist/esm/script/api/table.d.ts +479 -0
- package/dist/esm/script/api/table.d.ts.map +1 -0
- package/dist/esm/script/api/table.js +7 -0
- package/dist/esm/script/api/table.js.map +1 -0
- package/dist/esm/script/constants.d.ts +228 -83
- package/dist/esm/script/constants.d.ts.map +1 -1
- package/dist/esm/script/constants.js +110 -24
- package/dist/esm/script/constants.js.map +1 -1
- package/dist/esm/script/define.d.ts +94 -0
- package/dist/esm/script/define.d.ts.map +1 -0
- package/dist/esm/script/define.js +136 -0
- package/dist/esm/script/define.js.map +1 -0
- package/dist/esm/script/drawing-args.d.ts.map +1 -1
- package/dist/esm/script/drawing-args.js +2 -1
- package/dist/esm/script/drawing-args.js.map +1 -1
- package/dist/esm/script/formula.d.ts +53 -0
- package/dist/esm/script/formula.d.ts.map +1 -0
- package/dist/esm/script/formula.js +408 -0
- package/dist/esm/script/formula.js.map +1 -0
- package/dist/esm/script/globals.d.ts +10 -0
- package/dist/esm/script/globals.d.ts.map +1 -1
- package/dist/esm/script/globals.js.map +1 -1
- package/dist/esm/script/index.d.ts +1065 -1006
- package/dist/esm/script/index.d.ts.map +1 -1
- package/dist/esm/script/index.js +1096 -151
- package/dist/esm/script/index.js.map +1 -1
- package/dist/esm/script/json.d.ts +117 -0
- package/dist/esm/script/json.d.ts.map +1 -0
- package/dist/esm/script/json.js +375 -0
- package/dist/esm/script/json.js.map +1 -0
- package/dist/esm/str/index.d.ts +50 -75
- package/dist/esm/str/index.d.ts.map +1 -1
- package/dist/esm/str/index.js +51 -76
- package/dist/esm/str/index.js.map +1 -1
- package/dist/esm/strategy/index.d.ts +102 -1
- package/dist/esm/strategy/index.d.ts.map +1 -1
- package/dist/esm/strategy/index.js +1 -1
- package/dist/esm/strategy/index.js.map +1 -1
- package/dist/esm/table/index.d.ts +330 -49
- package/dist/esm/table/index.d.ts.map +1 -1
- package/dist/esm/table/index.js +372 -61
- package/dist/esm/table/index.js.map +1 -1
- package/dist/esm/text/index.d.ts +12 -14
- package/dist/esm/text/index.d.ts.map +1 -1
- package/dist/esm/text/index.js +12 -14
- package/dist/esm/text/index.js.map +1 -1
- package/dist/esm/types/index.d.ts +15 -8
- package/dist/esm/types/index.d.ts.map +1 -1
- package/dist/esm/types/index.js +15 -8
- package/dist/esm/types/index.js.map +1 -1
- package/docs/first-indicator.md +152 -0
- package/docs/guide.md +1185 -0
- package/docs/inventory.md +772 -0
- package/docs/no-code.md +207 -0
- package/docs/recipes.md +202 -0
- package/package.json +2 -1
- package/skills/oakscript/SKILL.md +8 -0
- package/skills/oakscript/reference/errors.md +3 -2
- package/src/box/index.ts +348 -289
- package/src/check/node.ts +1 -0
- package/src/check/preview.ts +307 -0
- package/src/color/index.ts +11 -11
- package/src/color/parse.ts +7 -0
- package/src/compare/index.ts +76 -12
- package/src/drawing/registry.ts +44 -5
- package/src/index.ts +1 -1
- package/src/label/index.ts +267 -189
- package/src/line/index.ts +248 -208
- package/src/linefill/index.ts +61 -89
- package/src/math/index.ts +51 -42
- package/src/polyline/index.ts +57 -78
- package/src/runtime/input-active.ts +2 -2
- package/src/runtime/series.ts +243 -163
- package/src/script/api/alert.ts +43 -0
- package/src/script/api/calc.ts +250 -0
- package/src/script/api/color.ts +245 -0
- package/src/script/api/context.ts +944 -0
- package/src/script/api/log.ts +60 -0
- package/src/script/api/strategy.ts +410 -0
- package/src/script/api/ta.ts +1115 -0
- package/src/script/api/table.ts +538 -0
- package/src/script/constants.ts +229 -25
- package/src/script/define.ts +221 -0
- package/src/script/drawing-args.ts +2 -1
- package/src/script/formula.ts +438 -0
- package/src/script/globals.ts +10 -0
- package/src/script/index.ts +1517 -239
- package/src/script/json.ts +457 -0
- package/src/str/index.ts +51 -76
- package/src/strategy/index.ts +102 -1
- package/src/table/index.ts +388 -62
- package/src/text/index.ts +12 -14
- package/src/types/index.ts +15 -8
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The documented type of the `color` namespace of the script API (colour constants and functions).
|
|
3
|
+
* @module script/api/color
|
|
4
|
+
*/
|
|
5
|
+
import type { Series } from '../../runtime/series.js';
|
|
6
|
+
/**
|
|
7
|
+
* Colours for plots, fills, backgrounds, bars and drawings: named colour constants (`color.red`, `color.teal`...)
|
|
8
|
+
* and functions that build a colour (`color.rgb`, `color.new`), read its parts (`color.r`, `color.t`) or choose one
|
|
9
|
+
* per bar (`color.when`, `color.from_gradient`). A colour is a text ("#2962FF", "rgba(41, 98, 255, 0.5)");
|
|
10
|
+
* transparency goes from 0 (opaque) to 100 (invisible). A missing colour (na) is `undefined`.
|
|
11
|
+
*/
|
|
12
|
+
export interface ColorNamespace {
|
|
13
|
+
/**
|
|
14
|
+
* Makes a colour from its red, green and blue parts, with an optional transparency.
|
|
15
|
+
* A part is clamped to 0-255 and a fraction is truncated; a `NaN` part counts as 0.
|
|
16
|
+
* @param red - Red part, 0-255.
|
|
17
|
+
* @param green - Green part, 0-255.
|
|
18
|
+
* @param blue - Blue part, 0-255.
|
|
19
|
+
* @param transp - Transparency, 0 (opaque) to 100 (invisible), clamped to that range; `NaN` is invisible.
|
|
20
|
+
* Default: 0.
|
|
21
|
+
* @returns The colour as "rgb(r, g, b)", or "rgba(r, g, b, alpha)" when it is transparent.
|
|
22
|
+
* @example
|
|
23
|
+
* ```js
|
|
24
|
+
* const orange = color.rgb(255, 140, 0);
|
|
25
|
+
* plot(close, "Close", { color: orange });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
rgb(red: number, green: number, blue: number, transp?: number): string;
|
|
29
|
+
/**
|
|
30
|
+
* Makes a colour from a hexadecimal text "RRGGBB" ("#" optional), with an optional transparency.
|
|
31
|
+
* @param hex - The colour as six hexadecimal digits, e.g. "#FF9800" or "ff9800".
|
|
32
|
+
* @param transp - Transparency, 0 (opaque) to 100 (invisible). Default: 0.
|
|
33
|
+
* @returns The colour as "rgb(r, g, b)" or "rgba(r, g, b, alpha)".
|
|
34
|
+
* @example
|
|
35
|
+
* ```js
|
|
36
|
+
* plot(close, "Close", { color: color.from_hex("#FF9800", 20) });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
from_hex(hex: string, transp?: number): string;
|
|
40
|
+
/**
|
|
41
|
+
* The same colour with another transparency: use it for fills and backgrounds you can see through.
|
|
42
|
+
* Its red, green and blue parts are kept, its own transparency is replaced. A missing colour (`undefined`) gives
|
|
43
|
+
* black with that transparency.
|
|
44
|
+
* @param baseColor - The colour to start from: a constant such as `color.red`, a "#RRGGBB" or "rgb(...)" text.
|
|
45
|
+
* @param transp - The new transparency, 0 (opaque) to 100 (invisible), clamped to that range; `NaN` is invisible.
|
|
46
|
+
* @returns The colour with the new transparency.
|
|
47
|
+
* @example
|
|
48
|
+
* ```js
|
|
49
|
+
* bgcolor(color.when(close.gt(open), color.new(color.green, 85)));
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
'new'(baseColor: string | number | null | undefined, transp: number): string;
|
|
53
|
+
/**
|
|
54
|
+
* Another name of `color.new()`: the same colour with another transparency.
|
|
55
|
+
* @param baseColor - The colour to start from.
|
|
56
|
+
* @param transp - The new transparency, 0 (opaque) to 100 (invisible).
|
|
57
|
+
* @returns The colour with the new transparency.
|
|
58
|
+
* @example
|
|
59
|
+
* ```js
|
|
60
|
+
* const shade = color.new_color(color.blue, 70);
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
new_color(baseColor: string | number | null | undefined, transp: number): string;
|
|
64
|
+
/**
|
|
65
|
+
* The colour faded by `amount`, from 0 (unchanged) to 1 (invisible): `color.fade(color.red, 0.8)` is
|
|
66
|
+
* `color.new(color.red, 80)`.
|
|
67
|
+
* @param c - The colour to fade.
|
|
68
|
+
* @param amount - How much to fade it: 0 (unchanged) to 1 (invisible). A value outside 0-1 throws.
|
|
69
|
+
* @returns The faded colour.
|
|
70
|
+
* @example
|
|
71
|
+
* ```js
|
|
72
|
+
* bgcolor(color.when(close.lt(open), color.fade(color.red, 0.9)));
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
fade(c: string, amount: number): string;
|
|
76
|
+
/**
|
|
77
|
+
* One colour per bar, picked by a condition: `colorTrue` on the bars where `cond` holds (not 0 and not NaN),
|
|
78
|
+
* `colorFalse` on the others. Pass the result as the `color` of `plot()`, `fill()`, `bgcolor()` or `barcolor()`.
|
|
79
|
+
* @param cond - The condition: a Series of 1 / 0, e.g. `close.gt(open)`.
|
|
80
|
+
* @param colorTrue - Colour of the bars where the condition holds.
|
|
81
|
+
* @param colorFalse - Colour of the other bars.
|
|
82
|
+
* @returns An array with one colour per bar.
|
|
83
|
+
* @example
|
|
84
|
+
* ```js
|
|
85
|
+
* plot(close, "Close", { color: color.when(close.gt(open), color.green, color.red) });
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
when(cond: Series, colorTrue: string, colorFalse: string): string[];
|
|
89
|
+
/**
|
|
90
|
+
* One colour per bar, picked by a condition: `colorTrue` on the bars where `cond` holds (not 0 and not NaN), no
|
|
91
|
+
* colour (`undefined`) on the others, which `bgcolor()` and `barcolor()` leave as they are.
|
|
92
|
+
* @param cond - The condition: a Series of 1 / 0, e.g. `close.gt(open)`.
|
|
93
|
+
* @param colorTrue - Colour of the bars where the condition holds.
|
|
94
|
+
* @param colorFalse - Colour of the other bars. Default: none (`undefined`).
|
|
95
|
+
* @returns An array with one colour, or `undefined`, per bar.
|
|
96
|
+
* @example
|
|
97
|
+
* ```js
|
|
98
|
+
* bgcolor(color.when(ta.rsi(close, 14).gt(70), color.new(color.red, 85)));
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
when(cond: Series, colorTrue: string, colorFalse?: string): Array<string | undefined>;
|
|
102
|
+
/**
|
|
103
|
+
* A colour between two colours, in proportion to where `value` lies between `bottom_value` and `top_value`
|
|
104
|
+
* (with numbers: one colour). `bottom_color` at or below the bottom, `top_color` at or above the top, a mix in
|
|
105
|
+
* between. A `NaN` value or limit, or equal limits, give a fully transparent colour; limits in the wrong order give
|
|
106
|
+
* `bottom_color`.
|
|
107
|
+
* @param value - The value that sets the position in the gradient.
|
|
108
|
+
* @param bottom_value - The value that gets `bottom_color`.
|
|
109
|
+
* @param top_value - The value that gets `top_color`.
|
|
110
|
+
* @param bottom_color - Colour at the bottom; a missing colour (`undefined`) counts as fully transparent.
|
|
111
|
+
* @param top_color - Colour at the top; a missing colour (`undefined`) counts as fully transparent.
|
|
112
|
+
* @returns The colour of that position.
|
|
113
|
+
* @example
|
|
114
|
+
* ```js
|
|
115
|
+
* const mid = color.from_gradient(50, 0, 100, color.red, color.green);
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
from_gradient(value: number, bottom_value: number, top_value: number, bottom_color: string | null | undefined, top_color: string | null | undefined): string;
|
|
119
|
+
/**
|
|
120
|
+
* One colour per bar, between two colours, in proportion to where `value` lies between `bottom_value` and
|
|
121
|
+
* `top_value` on that bar. Use it to shade a plot or a background by an oscillator. Any argument can be a Series
|
|
122
|
+
* (a colour: an array with one colour per bar, as made by `color.when`); with only numbers and colours it gives one
|
|
123
|
+
* colour. Same rules as the number form on each bar.
|
|
124
|
+
* @param value - The value that sets the position in the gradient: a Series or a number.
|
|
125
|
+
* @param bottom_value - The value that gets `bottom_color`: a Series or a number.
|
|
126
|
+
* @param top_value - The value that gets `top_color`: a Series or a number.
|
|
127
|
+
* @param bottom_color - Colour at the bottom, or one colour per bar.
|
|
128
|
+
* @param top_color - Colour at the top, or one colour per bar.
|
|
129
|
+
* @returns An array with one colour per bar (one colour when no argument varies per bar).
|
|
130
|
+
* @example
|
|
131
|
+
* ```js
|
|
132
|
+
* const rsi = ta.rsi(close, 14);
|
|
133
|
+
* plot(rsi, "RSI", { color: color.from_gradient(rsi, 30, 70, color.red, color.green) });
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
from_gradient(value: number | Series, bottom_value: number | Series, top_value: number | Series, bottom_color: string | null | undefined | readonly (string | null | undefined)[], top_color: string | null | undefined | readonly (string | null | undefined)[]): string | string[];
|
|
137
|
+
/**
|
|
138
|
+
* The red part of a colour.
|
|
139
|
+
* @param clr - The colour, e.g. `color.orange` or "#FF9800".
|
|
140
|
+
* @returns The red part, 0-255.
|
|
141
|
+
* @example
|
|
142
|
+
* ```js
|
|
143
|
+
* const red = color.r(color.orange);
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
r(clr: string | number): number;
|
|
147
|
+
/**
|
|
148
|
+
* The green part of a colour.
|
|
149
|
+
* @param clr - The colour, e.g. `color.orange` or "#FF9800".
|
|
150
|
+
* @returns The green part, 0-255.
|
|
151
|
+
* @example
|
|
152
|
+
* ```js
|
|
153
|
+
* const green = color.g(color.orange);
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
156
|
+
g(clr: string | number): number;
|
|
157
|
+
/**
|
|
158
|
+
* The blue part of a colour.
|
|
159
|
+
* @param clr - The colour, e.g. `color.orange` or "#FF9800".
|
|
160
|
+
* @returns The blue part, 0-255.
|
|
161
|
+
* @example
|
|
162
|
+
* ```js
|
|
163
|
+
* const blue = color.b(color.orange);
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
b(clr: string | number): number;
|
|
167
|
+
/**
|
|
168
|
+
* The transparency of a colour, a whole number from 0 (opaque) to 100 (invisible). A missing colour (`undefined`)
|
|
169
|
+
* gives 100.
|
|
170
|
+
* @param clr - The colour.
|
|
171
|
+
* @returns The transparency, 0-100.
|
|
172
|
+
* @example
|
|
173
|
+
* ```js
|
|
174
|
+
* const lighter = color.new(color.blue, Math.min(color.t(color.blue) + 50, 100));
|
|
175
|
+
* ```
|
|
176
|
+
*/
|
|
177
|
+
t(clr: string | number | null | undefined): number;
|
|
178
|
+
/** Aqua, "#00BCD4". */
|
|
179
|
+
readonly aqua: '#00BCD4';
|
|
180
|
+
/** Black (a dark grey-blue), "#363A45". */
|
|
181
|
+
readonly black: '#363A45';
|
|
182
|
+
/** Blue, "#2962FF": the default colour of `plot()`. */
|
|
183
|
+
readonly blue: '#2962FF';
|
|
184
|
+
/** Fuchsia, "#E040FB". */
|
|
185
|
+
readonly fuchsia: '#E040FB';
|
|
186
|
+
/** Gray, "#787B86". */
|
|
187
|
+
readonly gray: '#787B86';
|
|
188
|
+
/** Green, "#4CAF50". */
|
|
189
|
+
readonly green: '#4CAF50';
|
|
190
|
+
/** Lime (a bright green), "#00E676". */
|
|
191
|
+
readonly lime: '#00E676';
|
|
192
|
+
/** Maroon, "#880E4F". */
|
|
193
|
+
readonly maroon: '#880E4F';
|
|
194
|
+
/** Navy, "#311B92". */
|
|
195
|
+
readonly navy: '#311B92';
|
|
196
|
+
/** Olive, "#808000". */
|
|
197
|
+
readonly olive: '#808000';
|
|
198
|
+
/** Orange, "#FF9800". */
|
|
199
|
+
readonly orange: '#FF9800';
|
|
200
|
+
/** Purple, "#9C27B0". */
|
|
201
|
+
readonly purple: '#9C27B0';
|
|
202
|
+
/** Red, "#F23645". */
|
|
203
|
+
readonly red: '#F23645';
|
|
204
|
+
/** Silver (a light grey), "#B2B5BE". */
|
|
205
|
+
readonly silver: '#B2B5BE';
|
|
206
|
+
/** Teal, "#089981". */
|
|
207
|
+
readonly teal: '#089981';
|
|
208
|
+
/** White, "#FFFFFF". */
|
|
209
|
+
readonly white: '#FFFFFF';
|
|
210
|
+
/** Yellow, "#FDD835". */
|
|
211
|
+
readonly yellow: '#FDD835';
|
|
212
|
+
}
|
|
213
|
+
//# sourceMappingURL=color.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../src/script/api/color.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAG7B;;;;;;;;;;;;;;OAcG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAEvE;;;;;;;;;OASG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE/C;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAE7E;;;;;;;;;OASG;IACH,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAEjF;;;;;;;;;;OAUG;IACH,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAIxC;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACpE;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEtF;;;;;;;;;;;;;;;OAeG;IACH,aAAa,CACX,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACvC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACnC,MAAM,CAAC;IACV;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,CACX,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,YAAY,EAAE,MAAM,GAAG,MAAM,EAC7B,SAAS,EAAE,MAAM,GAAG,MAAM,EAC1B,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,EAChF,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,GAC5E,MAAM,GAAG,MAAM,EAAE,CAAC;IAIrB;;;;;;;;OAQG;IACH,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAEhC;;;;;;;;OAQG;IACH,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAEhC;;;;;;;;OAQG;IACH,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAEhC;;;;;;;;;OASG;IACH,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC;IAInD,uBAAuB;IACvB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,2CAA2C;IAC3C,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,uDAAuD;IACvD,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,0BAA0B;IAC1B,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,uBAAuB;IACvB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,wBAAwB;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,wCAAwC;IACxC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,yBAAyB;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,uBAAuB;IACvB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,wBAAwB;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,yBAAyB;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,yBAAyB;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,sBAAsB;IACtB,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;IACxB,wCAAwC;IACxC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,uBAAuB;IACvB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,wBAAwB;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,yBAAyB;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;CAC5B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var color_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(color_exports);
|
|
17
|
+
//# sourceMappingURL=color.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/script/api/color.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @fileoverview The documented type of the `color` namespace of the script API (colour constants and functions).\n * @module script/api/color\n */\n\nimport type { Series } from '../../runtime/series.js';\n\n/**\n * Colours for plots, fills, backgrounds, bars and drawings: named colour constants (`color.red`, `color.teal`...)\n * and functions that build a colour (`color.rgb`, `color.new`), read its parts (`color.r`, `color.t`) or choose one\n * per bar (`color.when`, `color.from_gradient`). A colour is a text (\"#2962FF\", \"rgba(41, 98, 255, 0.5)\");\n * transparency goes from 0 (opaque) to 100 (invisible). A missing colour (na) is `undefined`.\n */\nexport interface ColorNamespace {\n // \u2500\u2500 Building colours \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n /**\n * Makes a colour from its red, green and blue parts, with an optional transparency.\n * A part is clamped to 0-255 and a fraction is truncated; a `NaN` part counts as 0.\n * @param red - Red part, 0-255.\n * @param green - Green part, 0-255.\n * @param blue - Blue part, 0-255.\n * @param transp - Transparency, 0 (opaque) to 100 (invisible), clamped to that range; `NaN` is invisible.\n * Default: 0.\n * @returns The colour as \"rgb(r, g, b)\", or \"rgba(r, g, b, alpha)\" when it is transparent.\n * @example\n * ```js\n * const orange = color.rgb(255, 140, 0);\n * plot(close, \"Close\", { color: orange });\n * ```\n */\n rgb(red: number, green: number, blue: number, transp?: number): string;\n\n /**\n * Makes a colour from a hexadecimal text \"RRGGBB\" (\"#\" optional), with an optional transparency.\n * @param hex - The colour as six hexadecimal digits, e.g. \"#FF9800\" or \"ff9800\".\n * @param transp - Transparency, 0 (opaque) to 100 (invisible). Default: 0.\n * @returns The colour as \"rgb(r, g, b)\" or \"rgba(r, g, b, alpha)\".\n * @example\n * ```js\n * plot(close, \"Close\", { color: color.from_hex(\"#FF9800\", 20) });\n * ```\n */\n from_hex(hex: string, transp?: number): string;\n\n /**\n * The same colour with another transparency: use it for fills and backgrounds you can see through.\n * Its red, green and blue parts are kept, its own transparency is replaced. A missing colour (`undefined`) gives\n * black with that transparency.\n * @param baseColor - The colour to start from: a constant such as `color.red`, a \"#RRGGBB\" or \"rgb(...)\" text.\n * @param transp - The new transparency, 0 (opaque) to 100 (invisible), clamped to that range; `NaN` is invisible.\n * @returns The colour with the new transparency.\n * @example\n * ```js\n * bgcolor(color.when(close.gt(open), color.new(color.green, 85)));\n * ```\n */\n 'new'(baseColor: string | number | null | undefined, transp: number): string;\n\n /**\n * Another name of `color.new()`: the same colour with another transparency.\n * @param baseColor - The colour to start from.\n * @param transp - The new transparency, 0 (opaque) to 100 (invisible).\n * @returns The colour with the new transparency.\n * @example\n * ```js\n * const shade = color.new_color(color.blue, 70);\n * ```\n */\n new_color(baseColor: string | number | null | undefined, transp: number): string;\n\n /**\n * The colour faded by `amount`, from 0 (unchanged) to 1 (invisible): `color.fade(color.red, 0.8)` is\n * `color.new(color.red, 80)`.\n * @param c - The colour to fade.\n * @param amount - How much to fade it: 0 (unchanged) to 1 (invisible). A value outside 0-1 throws.\n * @returns The faded colour.\n * @example\n * ```js\n * bgcolor(color.when(close.lt(open), color.fade(color.red, 0.9)));\n * ```\n */\n fade(c: string, amount: number): string;\n\n // \u2500\u2500 Choosing a colour per bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n /**\n * One colour per bar, picked by a condition: `colorTrue` on the bars where `cond` holds (not 0 and not NaN),\n * `colorFalse` on the others. Pass the result as the `color` of `plot()`, `fill()`, `bgcolor()` or `barcolor()`.\n * @param cond - The condition: a Series of 1 / 0, e.g. `close.gt(open)`.\n * @param colorTrue - Colour of the bars where the condition holds.\n * @param colorFalse - Colour of the other bars.\n * @returns An array with one colour per bar.\n * @example\n * ```js\n * plot(close, \"Close\", { color: color.when(close.gt(open), color.green, color.red) });\n * ```\n */\n when(cond: Series, colorTrue: string, colorFalse: string): string[];\n /**\n * One colour per bar, picked by a condition: `colorTrue` on the bars where `cond` holds (not 0 and not NaN), no\n * colour (`undefined`) on the others, which `bgcolor()` and `barcolor()` leave as they are.\n * @param cond - The condition: a Series of 1 / 0, e.g. `close.gt(open)`.\n * @param colorTrue - Colour of the bars where the condition holds.\n * @param colorFalse - Colour of the other bars. Default: none (`undefined`).\n * @returns An array with one colour, or `undefined`, per bar.\n * @example\n * ```js\n * bgcolor(color.when(ta.rsi(close, 14).gt(70), color.new(color.red, 85)));\n * ```\n */\n when(cond: Series, colorTrue: string, colorFalse?: string): Array<string | undefined>;\n\n /**\n * A colour between two colours, in proportion to where `value` lies between `bottom_value` and `top_value`\n * (with numbers: one colour). `bottom_color` at or below the bottom, `top_color` at or above the top, a mix in\n * between. A `NaN` value or limit, or equal limits, give a fully transparent colour; limits in the wrong order give\n * `bottom_color`.\n * @param value - The value that sets the position in the gradient.\n * @param bottom_value - The value that gets `bottom_color`.\n * @param top_value - The value that gets `top_color`.\n * @param bottom_color - Colour at the bottom; a missing colour (`undefined`) counts as fully transparent.\n * @param top_color - Colour at the top; a missing colour (`undefined`) counts as fully transparent.\n * @returns The colour of that position.\n * @example\n * ```js\n * const mid = color.from_gradient(50, 0, 100, color.red, color.green);\n * ```\n */\n from_gradient(\n value: number,\n bottom_value: number,\n top_value: number,\n bottom_color: string | null | undefined,\n top_color: string | null | undefined\n ): string;\n /**\n * One colour per bar, between two colours, in proportion to where `value` lies between `bottom_value` and\n * `top_value` on that bar. Use it to shade a plot or a background by an oscillator. Any argument can be a Series\n * (a colour: an array with one colour per bar, as made by `color.when`); with only numbers and colours it gives one\n * colour. Same rules as the number form on each bar.\n * @param value - The value that sets the position in the gradient: a Series or a number.\n * @param bottom_value - The value that gets `bottom_color`: a Series or a number.\n * @param top_value - The value that gets `top_color`: a Series or a number.\n * @param bottom_color - Colour at the bottom, or one colour per bar.\n * @param top_color - Colour at the top, or one colour per bar.\n * @returns An array with one colour per bar (one colour when no argument varies per bar).\n * @example\n * ```js\n * const rsi = ta.rsi(close, 14);\n * plot(rsi, \"RSI\", { color: color.from_gradient(rsi, 30, 70, color.red, color.green) });\n * ```\n */\n from_gradient(\n value: number | Series,\n bottom_value: number | Series,\n top_value: number | Series,\n bottom_color: string | null | undefined | readonly (string | null | undefined)[],\n top_color: string | null | undefined | readonly (string | null | undefined)[]\n ): string | string[];\n\n // \u2500\u2500 Reading a colour \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n /**\n * The red part of a colour.\n * @param clr - The colour, e.g. `color.orange` or \"#FF9800\".\n * @returns The red part, 0-255.\n * @example\n * ```js\n * const red = color.r(color.orange);\n * ```\n */\n r(clr: string | number): number;\n\n /**\n * The green part of a colour.\n * @param clr - The colour, e.g. `color.orange` or \"#FF9800\".\n * @returns The green part, 0-255.\n * @example\n * ```js\n * const green = color.g(color.orange);\n * ```\n */\n g(clr: string | number): number;\n\n /**\n * The blue part of a colour.\n * @param clr - The colour, e.g. `color.orange` or \"#FF9800\".\n * @returns The blue part, 0-255.\n * @example\n * ```js\n * const blue = color.b(color.orange);\n * ```\n */\n b(clr: string | number): number;\n\n /**\n * The transparency of a colour, a whole number from 0 (opaque) to 100 (invisible). A missing colour (`undefined`)\n * gives 100.\n * @param clr - The colour.\n * @returns The transparency, 0-100.\n * @example\n * ```js\n * const lighter = color.new(color.blue, Math.min(color.t(color.blue) + 50, 100));\n * ```\n */\n t(clr: string | number | null | undefined): number;\n\n // \u2500\u2500 Colour constants \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n /** Aqua, \"#00BCD4\". */\n readonly aqua: '#00BCD4';\n /** Black (a dark grey-blue), \"#363A45\". */\n readonly black: '#363A45';\n /** Blue, \"#2962FF\": the default colour of `plot()`. */\n readonly blue: '#2962FF';\n /** Fuchsia, \"#E040FB\". */\n readonly fuchsia: '#E040FB';\n /** Gray, \"#787B86\". */\n readonly gray: '#787B86';\n /** Green, \"#4CAF50\". */\n readonly green: '#4CAF50';\n /** Lime (a bright green), \"#00E676\". */\n readonly lime: '#00E676';\n /** Maroon, \"#880E4F\". */\n readonly maroon: '#880E4F';\n /** Navy, \"#311B92\". */\n readonly navy: '#311B92';\n /** Olive, \"#808000\". */\n readonly olive: '#808000';\n /** Orange, \"#FF9800\". */\n readonly orange: '#FF9800';\n /** Purple, \"#9C27B0\". */\n readonly purple: '#9C27B0';\n /** Red, \"#F23645\". */\n readonly red: '#F23645';\n /** Silver (a light grey), \"#B2B5BE\". */\n readonly silver: '#B2B5BE';\n /** Teal, \"#089981\". */\n readonly teal: '#089981';\n /** White, \"#FFFFFF\". */\n readonly white: '#FFFFFF';\n /** Yellow, \"#FDD835\". */\n readonly yellow: '#FDD835';\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|