Module: Colors

Colors

Source:

Methods

<inner> getBackgroundColor(range) → {string}

Gets the background color at the given range.
Parameters:
Name Type Description
range Range
Source:
Returns:
Style color string
Type
string

<inner> getStyle(range, property) → {string}

Gets the style of the start container of the given range.
Parameters:
Name Type Description
range Range
property string
Source:
Returns:
Style value
Type
string

<inner> getTextColor(range) → {string}

Gets the text color at the given range.
Parameters:
Name Type Description
range Range
Source:
Returns:
Style color string
Type
string

<inner> hex(value) → {string}

Given a color string will normalize it to a hex color string.
Parameters:
Name Type Description
value string
Source:
Returns:
Type
string

<inner> isColorEqual(colorA, colorB) → {boolean}

Checks whether the two given colors are equal in value (if not in representation). isColorEqual('#f00', 'rgb(255,0,0)') === true
Parameters:
Name Type Description
colorA string
colorB string
Source:
Returns:
Type
boolean

<inner> normalizeHex(color) → {string}

Normalizes hexidecimal colors from #f34 to #ff3344
Parameters:
Name Type Description
color string
Source:
Returns:
Long version of hexidecimal color value
Type
string

<inner> rgb2hex(rgb) → {string}

Converts rgb color array to a hex color string.
Parameters:
Name Type Description
rgb Array.<string>
Source:
Returns:
Type
string

<inner> setBackgroundColor(range, color)

Sets the background color at the given range.
Parameters:
Name Type Description
range Range
color string
Source:

<inner> setTextColor(range, color)

Sets the text color at the given range.
Parameters:
Name Type Description
range Range
color string
Source:

<inner> unsetBackgroundColor(range)

Removes the background color at the given range.
Parameters:
Name Type Description
range Range
Source:

<inner> unsetTextColor(range)

Removes the text color at the given range.
Parameters:
Name Type Description
range Range
Source: