Skip to main content

Color

Color-related routines.

Constructors

new Color()

new Color(): Color

Returns

Color

Accessors

areaSelection

get static areaSelection(): number

Returns

number

Source

src/widgets.ts:1668


areaZoom

get static areaZoom(): number

Returns

number

Source

src/widgets.ts:1680


barChart

get static barChart(): number

Returns

number

Source

src/widgets.ts:1652


black

get static black(): number

Returns

number

Source

src/widgets.ts:1564


blue

get static blue(): number

Returns

number

Source

src/widgets.ts:1552


categoricalPalette

get static categoricalPalette(): number[]

Returns the standard palette of the categorical colors used across all visualizations in Datagrok.

Returns

number[]

Source

src/widgets.ts:1507


categoricalPalettes

get static categoricalPalettes(): object

Returns the map of existing palettes used in Datagrok.

Returns

object

Source

src/widgets.ts:1512


colSelection

get static colSelection(): number

Returns

number

Source

src/widgets.ts:1676


currentRow

get static currentRow(): number

Returns

number

Source

src/widgets.ts:1644


cyan

get static cyan(): number

Returns

number

Source

src/widgets.ts:1620


darkBlue

get static darkBlue(): number

Returns

number

Source

src/widgets.ts:1604


darkGray

get static darkGray(): number

Returns

number

Source

src/widgets.ts:1548


darkGreen

get static darkGreen(): number

Returns

number

Source

src/widgets.ts:1560


darkOrange

get static darkOrange(): number

Returns

number

Source

src/widgets.ts:1596


darkRed

get static darkRed(): number

Returns

number

Source

src/widgets.ts:1580


failure

get static failure(): number

Returns

number

Source

src/widgets.ts:1692


filteredOutRows

get static filteredOutRows(): number

Returns

number

Source

src/widgets.ts:1628


filteredRows

get static filteredRows(): number

Returns

number

Source

src/widgets.ts:1624


gray

get static gray(): number

Returns

number

Source

src/widgets.ts:1536


green

get static green(): number

Returns

number

Source

src/widgets.ts:1556


gridWarningBackground

get static gridWarningBackground(): number

Returns

number

Source

src/widgets.ts:1684


histogramBar

get static histogramBar(): number

Returns

number

Source

src/widgets.ts:1648


lightBlue

get static lightBlue(): number

Returns

number

Source

src/widgets.ts:1600


lightGray

get static lightGray(): number

Returns

number

Source

src/widgets.ts:1544


lightLightGray

get static lightLightGray(): number

Returns

number

Source

src/widgets.ts:1540


maroon

get static maroon(): number

Returns

number

Source

src/widgets.ts:1584


missingValueRows

get static missingValueRows(): number

Returns

number

Source

src/widgets.ts:1636


mouseOverRows

get static mouseOverRows(): number

Returns

number

Source

src/widgets.ts:1640


get static navy(): number

Returns

number

Source

src/widgets.ts:1616


olive

get static olive(): number

Returns

number

Source

src/widgets.ts:1588


orange

get static orange(): number

Returns

number

Source

src/widgets.ts:1592


purple

get static purple(): number

Returns

number

Source

src/widgets.ts:1608


red

get static red(): number

Returns

number

Source

src/widgets.ts:1576


rowSelection

get static rowSelection(): number

Returns

number

Source

src/widgets.ts:1672


scatterPlotMarker

get static scatterPlotMarker(): number

Returns

number

Source

src/widgets.ts:1656


scatterPlotSelection

get static scatterPlotSelection(): number

Returns

number

Source

src/widgets.ts:1660


scatterPlotZoom

get static scatterPlotZoom(): number

Returns

number

Source

src/widgets.ts:1664


selectedRows

get static selectedRows(): number

Returns

number

Source

src/widgets.ts:1632


success

get static success(): number

Returns

number

Source

src/widgets.ts:1688


white

get static white(): number

Returns

number

Source

src/widgets.ts:1572


whitesmoke

get static whitesmoke(): number

Returns

number

Source

src/widgets.ts:1612


yellow

get static yellow(): number

Returns

number

Source

src/widgets.ts:1568

Methods

a()

static a(c): number

Returns the Alpha component of the color represented as ARGB-formatted integer.

Parameters

ParameterType
cnumber

Returns

number

Source

src/widgets.ts:1452


argb()

static argb(a, r, g, b): number

Parameters

ParameterType
anumber
rnumber
gnumber
bnumber

Returns

number

Source

src/widgets.ts:1463


b()

static b(c): number

Returns the Blue component of the color represented as ARGB-formatted integer.

Parameters

ParameterType
cnumber

Returns

number

Source

src/widgets.ts:1461


darken()

static darken(color, diff): number

Parameters

ParameterType
colornumber
diffnumber

Returns

number

Source

src/widgets.ts:1524


fromHtml()

static fromHtml(htmlColor): number

Convert HTML-formatted string (such as #ffffff) to ARGB-fromatted integer color

Parameters

ParameterType
htmlColorstring

Returns

number

Source

src/widgets.ts:1486


g()

static g(c): number

Returns the Green component of the color represented as ARGB-formatted integer.

Parameters

ParameterType
cnumber

Returns

number

Source

src/widgets.ts:1458


getCategoricalColor()

static getCategoricalColor(i): number

Returns i-th categorical color (looping over the palette if needed)

Parameters

ParameterType
inumber

Returns

number

Source

src/widgets.ts:1473


getCategoryColor()

static getCategoryColor(column, category): number

Returns a color associated with the specified category within a column. Returns ARGB-formatted integer. To convert to html color, use toHtml.

Parameters

ParameterType
columnColumn<any>
categoryany

Returns

number

Source

src/widgets.ts:1447


getCellColor()

static getCellColor(cell): number

Returns a color associated with the specified cell as an ARGB-formatted integer. To convert to html color, use getCellColorHtml or toHtml.

Parameters

ParameterType
cellCell

Returns

number

Source

src/widgets.ts:1435


getCellColorHtml()

static getCellColorHtml(cell): string

Returns a string representation of the color associated with the specified cell. For batch color manipulations, use getCellColor.

Parameters

ParameterType
cellCell

Returns

string

Source

src/widgets.ts:1441


getContrastColor()

static getContrastColor(color): number

Returns either black or white color, depending on which one would be most contrast to the specified [color].

Parameters

ParameterType
colornumber

Returns

number

Source

src/widgets.ts:1478


getRowColor()

static getRowColor(column, row): number

Parameters

ParameterType
columnColumn<any>
rownumber

Returns

number

Source

src/widgets.ts:1528


hexToPercentRgb()

static hexToPercentRgb(hex): null | number[]

For RDKit molecule substruct highlight

Parameters

ParameterType
hexstring

Returns

null | number[]

Source

src/widgets.ts:1494


highlight()

static highlight(color): number

Parameters

ParameterType
colornumber

Returns

number

Source

src/widgets.ts:1520


r()

static r(c): number

Returns the Red component of the color represented as ARGB-formatted integer.

Parameters

ParameterType
cnumber

Returns

number

Source

src/widgets.ts:1455


scale()

static scale(x, min, max): number

Parameters

ParameterType
xnumber
minnumber
maxnumber

Returns

number

Source

src/widgets.ts:1532


scaleColor()

static scaleColor(x, min, max, alpha?, colorScheme?): number

Parameters

ParameterType
xnumber
minnumber
maxnumber
alpha?number
colorScheme?number[]

Returns

number

Source

src/widgets.ts:1516


setAlpha()

static setAlpha(color, alpha): number

Returns the color with the specified alpha component (0-255).

Parameters

ParameterType
colornumber
alphanumber

Returns

number

Source

src/widgets.ts:1468


toHtml()

static toHtml(color): string

Converts ARGB-formatted integer color to a HTML-formatted string (such as #ffffff). See also toRgb.

Parameters

ParameterType
colornumber

Returns

string

Source

src/widgets.ts:1483


toRgb()

static toRgb(color): string

Converts ARGB-formatted integer color to a HTML-formatted string (such as rbg(20, 46, 124)). See also toHtml.

Parameters

ParameterType
colornumber

Returns

string

Source

src/widgets.ts:1489