UNPKG

7.68 kBTypeScriptView Raw
1// Type definitions for D3JS d3-scale-chromatic module v1.0.2
2// Project: https://github.com/d3/d3-scale-chromatic/
3// Definitions by: Hugues Stefanski <https://github.com/Ledragon>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
6// -----------------------------------------------------------------------
7// Categorical
8// -----------------------------------------------------------------------
9/**An array of eight categorical colors represented as RGB hexadecimal strings. */
10export const schemeAccent: Array<string>;
11/**An array of eight categorical colors represented as RGB hexadecimal strings. */
12export const schemeDark2: Array<string>;
13/**An array of twelve categorical colors represented as RGB hexadecimal strings. */
14export const schemePaired: Array<string>;
15/**An array of nine categorical colors represented as RGB hexadecimal strings. */
16export const schemePastel1: Array<string>;
17/**An array of eight categorical colors represented as RGB hexadecimal strings. */
18export const schemePastel2: Array<string>;
19/**An array of nine categorical colors represented as RGB hexadecimal strings. */
20export const schemeSet1: Array<string>;
21/**An array of eight categorical colors represented as RGB hexadecimal strings. */
22export const schemeSet2: Array<string>;
23/**An array of twelve categorical colors represented as RGB hexadecimal strings. */
24export const schemeSet3: Array<string>;
25
26// -----------------------------------------------------------------------
27// Diverging
28// -----------------------------------------------------------------------
29/**Given a number value in the range [0,1], returns the corresponding color from the “BrBG” diverging color scheme represented as an RGB string. */
30export function interpolateBrBG(value: number): string;
31/** Given a number t in the range [0,1], returns the corresponding color from the “PRGn” diverging color scheme represented as an RGB string.*/
32export function interpolatePRGn(value: number): string;
33/** Given a number t in the range [0,1], returns the corresponding color from the “PiYG” diverging color scheme represented as an RGB string.*/
34export function interpolatePiYG(value: number): string;
35/** Given a number t in the range [0,1], returns the corresponding color from the “PuOr” diverging color scheme represented as an RGB string.*/
36export function interpolatePuOr(value: number): string;
37/** Given a number t in the range [0,1], returns the corresponding color from the “RdBu” diverging color scheme represented as an RGB string.*/
38export function interpolateRdBu(value: number): string;
39/** Given a number t in the range [0,1], returns the corresponding color from the “RdGy” diverging color scheme represented as an RGB string.*/
40export function interpolateRdGy(value: number): string;
41/** Given a number t in the range [0,1], returns the corresponding color from the “RdYlBu” diverging color scheme represented as an RGB string.*/
42export function interpolateRdYlBu(value: number): string;
43/** Given a number t in the range [0,1], returns the corresponding color from the “RdYlGn” diverging color scheme represented as an RGB string.*/
44export function interpolateRdYlGn(value: number): string;
45/** Given a number t in the range [0,1], returns the corresponding color from the “Spectral” diverging color scheme represented as an RGB string.*/
46export function interpolateSpectral(value: number): string;
47
48// -----------------------------------------------------------------------
49// Sequential
50// -----------------------------------------------------------------------
51/**Given a number t in the range [0,1], returns the corresponding color from the “Blues” sequential color scheme represented as an RGB string. */
52export function interpolateBlues(value: number): string;
53/**Given a number t in the range [0,1], returns the corresponding color from the “Greens” sequential color scheme represented as an RGB string. */
54export function interpolateGreens(value: number): string;
55/**Given a number t in the range [0,1], returns the corresponding color from the “Greys” sequential color scheme represented as an RGB string. */
56export function interpolateGreys(value: number): string;
57/**Given a number t in the range [0,1], returns the corresponding color from the “Oranges” sequential color scheme represented as an RGB string. */
58export function interpolateOranges(value: number): string;
59/**Given a number t in the range [0,1], returns the corresponding color from the “Purples” sequential color scheme represented as an RGB string. */
60export function interpolatePurples(value: number): string;
61/**Given a number t in the range [0,1], returns the corresponding color from the “Reds” sequential color scheme represented as an RGB string. */
62export function interpolateReds(value: number): string;
63
64// -----------------------------------------------------------------------
65// Sequential(Multi-Hue)
66// -----------------------------------------------------------------------
67
68/**Given a number t in the range [0,1], returns the corresponding color from the “BuGn” sequential color scheme represented as an RGB string. */
69export function interpolateBuGn(value: number): string;
70/**Given a number t in the range [0,1], returns the corresponding color from the “BuPu” sequential color scheme represented as an RGB string. */
71export function interpolateBuPu(value: number): string;
72/**Given a number t in the range [0,1], returns the corresponding color from the “GnBu” sequential color scheme represented as an RGB string. */
73export function interpolateGnBu(value: number): string;
74/**Given a number t in the range [0,1], returns the corresponding color from the “OrRd” sequential color scheme represented as an RGB string. */
75export function interpolateOrRd(value: number): string;
76/**Given a number t in the range [0,1], returns the corresponding color from the “PuBuGn” sequential color scheme represented as an RGB string. */
77export function interpolatePuBuGn(value: number): string;
78/**Given a number t in the range [0,1], returns the corresponding color from the “PuBu” sequential color scheme represented as an RGB string. */
79export function interpolatePuBu(value: number): string;
80/**Given a number t in the range [0,1], returns the corresponding color from the “PuRd” sequential color scheme represented as an RGB string. */
81export function interpolatePuRd(value: number): string;
82/**Given a number t in the range [0,1], returns the corresponding color from the “RdPu” sequential color scheme represented as an RGB string. */
83export function interpolateRdPu(value: number): string;
84/**Given a number t in the range [0,1], returns the corresponding color from the “YlGnBu” sequential color scheme represented as an RGB string. */
85export function interpolateYlGnBu(value: number): string;
86/**Given a number t in the range [0,1], returns the corresponding color from the “YlGn” sequential color scheme represented as an RGB string. */
87export function interpolateYlGn(value: number): string;
88/**Given a number t in the range [0,1], returns the corresponding color from the “YlOrBr” sequential color scheme represented as an RGB string. */
89export function interpolateYlOrBr(value: number): string;
90/**Given a number t in the range [0,1], returns the corresponding color from the “YlOrRd” sequential color scheme represented as an RGB string. */
91export function interpolateYlOrRd(value: number): string;