HexagonJS
Color Changelog
2.7.1
hx.color.isColorBoolean
Deprecated
Replaced by hx.isColor
hx.color.isColorStringBoolean
Deprecated
Replaced by hx.isColorString
2.7.0
hx.color.isColorBoolean
Deprecated
Replaced by hx.isColor
hx.color.isColorStringBoolean
Deprecated
Replaced by hx.isColorString
2.5.3
hx.color.isColorBoolean
Deprecated
Replaced by hx.isColor
hx.color.isColorStringBoolean
Deprecated
Replaced by hx.isColorString
2.5.2
hx.color.isColorBoolean
Deprecated
Replaced by hx.isColor
hx.color.isColorStringBoolean
Deprecated
Replaced by hx.isColorString
2.5.1
hx.color.isColorBoolean
Deprecated
Replaced by hx.isColor
hx.color.isColorStringBoolean
Deprecated
Replaced by hx.isColorString
2.5.0
hx.color.isColorBoolean
Deprecated
Replaced by hx.isColor
hx.color.isColorStringBoolean
Deprecated
Replaced by hx.isColorString
2.4.0
hx.color.isColorBoolean
Deprecated
Replaced by hx.isColor
hx.color.isColorStringBoolean
Deprecated
Replaced by hx.isColorString
2.3.1
hx.color.isColorBoolean
Deprecated
Replaced by hx.isColor
hx.color.isColorStringBoolean
Deprecated
Replaced by hx.isColorString
2.3.0
hx.color.isColorBoolean
Deprecated
Replaced by hx.isColor
hx.color.isColorStringBoolean
Deprecated
Replaced by hx.isColorString
2.2.0
hx.color.isColorBoolean
Deprecated
Replaced by hx.isColor
hx.color.isColorStringBoolean
Deprecated
Replaced by hx.isColorString
2.1.0
hx.color.isColorBoolean
Deprecated
Replaced by hx.isColor
hx.color.isColorStringBoolean
Deprecated
Replaced by hx.isColorString
2.0.3
hx.color.isColorBoolean
Deprecated
Replaced by hx.isColor
hx.color.isColorStringBoolean
Deprecated
Replaced by hx.isColorString
2.0.2
hx.color.isColorBoolean
Deprecated
Replaced by hx.isColor
hx.color.isColorStringBoolean
Deprecated
Replaced by hx.isColorString
2.0.1
hx.color.isColorBoolean
Deprecated
Replaced by hx.isColor
hx.color.isColorStringBoolean
Deprecated
Replaced by hx.isColorString
2.0.0
hx.isColorBoolean
Added
Checks if an object is a Color instance.
hx.color.isColorBoolean
Deprecated
Replaced by hx.isColor
hx.isColorStringBoolean
Added
Checks if a string is a css color string.
hx.color.isColorStringBoolean
Deprecated
Replaced by hx.isColorString
1.0.0
Color
Removed
Use alpha() to get and alpha(value) to set the alpha property.
Color
Removed
Use blue() to get and blue(value) to set the blue property.
Color
Removed
Use green() to get and green(value) to set the green property.
Color
Removed
Use hue() to get and hue(value) to set the hue property. The value returned from hue() and expected by hue(value) is an integer between 0 and 360 instead of a value between 0 and 1.
Color
Removed
Use lightness() to get and lightness(value) to set the lightness property. The value returned from hue() and expected by hue(value) is an integer between 0 and 100 instead of a value between 0 and 1.
Color
Removed
Use red() to get and red(value) to set the red property.
Color
Removed
Use saturation() to get and saturation(value) to set the saturation property. The value returned from hue() and expected by hue(value) is an integer between 0 and 100 instead of a value between 0 and 1.
Color
darkenColor
Removed
Use lighten(-value) instead.
Color
desaturateColor
Removed
Use saturate(-value) instead.
Color
fadeInColor
Removed
Use fade(value) instead.
Color
fadeOutColor
Removed
Use fade(-value) instead.
Color
getTextColString
Removed
Use textCol() instead.
Color
lightnessColor
Removed
Use lightness(value) with a value between 0 and 100 instead of 0 and 1
Color
saturationColor
Removed
Use saturation(value) with a value between 0 and 100 instead of 0 and 1
Color
setHSLColor
Removed
Use hsl(value) instead.
Color
setRGBColor
Removed
Use rgb(value) instead.
Color
toArrayArray[Number]
Removed
Use rgb() or hsl() instead.
0.15.3
Color
Deprecated
Use alpha() to get and alpha(value) to set the alpha property.
Color
Deprecated
Use blue() to get and blue(value) to set the blue property.
Color
Deprecated
Use green() to get and green(value) to set the green property.
Color
Deprecated
Use hue() to get and hue(value) to set the hue property. The value returned from hue() and expected by hue(value) is an integer between 0 and 360 instead of a value between 0 and 1.
Color
Deprecated
Use lightness() to get and lightness(value) to set the lightness property. The value returned from hue() and expected by hue(value) is an integer between 0 and 100 instead of a value between 0 and 1.
Color
Deprecated
Use red() to get and red(value) to set the red property.
Color
Deprecated
Use saturation() to get and saturation(value) to set the saturation property. The value returned from hue() and expected by hue(value) is an integer between 0 and 100 instead of a value between 0 and 1.
Color
darkenColor
Deprecated
Use lighten(-value) instead.
Color
desaturateColor
Deprecated
Use saturate(-value) instead.
Color
fadeInColor
Deprecated
Use fade(value) instead.
Color
fadeOutColor
Deprecated
Color
getTextColString
Deprecated
Use textCol() instead.
Color
lightnessColor
Deprecated
Use lightness(value) with a value between 0 and 100 instead of 0 and 1
Color
saturationColor
Deprecated
Use saturation(value) with a value between 0 and 100 instead of 0 and 1
Color
setHSLColor
Deprecated
Use hsl(value) instead.
Color
setRGBColor
Deprecated
Use rgb(value) instead.
Color
toArrayArray[Number]
Deprecated
Use rgb() or hsl() instead.
0.15.2
Color
Updated
Updated the API to convert properties to getters/setters and also added some consistency between the hsl/rgb values by converting the hue, saturation and lightness values from unit values (between 0 and 1) to true values, between 0 and 360 for hue and 0 and 100 for saturation and lightness as these are the values used in CSS.
The methods added for each property (e.g. red, green etc.) will also have aliased methods (e.g. r, g etc.) once the deprecated properties have been removed (as they share the same name)
Color
Deprecated
Use alpha() to get and alpha(value) to set the alpha property.
Color
Deprecated
Use blue() to get and blue(value) to set the blue property.
Color
Deprecated
Use green() to get and green(value) to set the green property.
Color
Deprecated
Use hue() to get and hue(value) to set the hue property. The value returned from hue() and expected by hue(value) is an integer between 0 and 360 instead of a value between 0 and 1.
Color
Deprecated
Use lightness() to get and lightness(value) to set the lightness property. The value returned from hue() and expected by hue(value) is an integer between 0 and 100 instead of a value between 0 and 1.
Color
Deprecated
Use red() to get and red(value) to set the red property.
Color
Deprecated
Use saturation() to get and saturation(value) to set the saturation property. The value returned from hue() and expected by hue(value) is an integer between 0 and 100 instead of a value between 0 and 1.
Color
blueNumber
Added
Gets the blue value for a color.
Color
blueColor
Added
Sets the blue value for a color.
Color
darkenColor
Deprecated
Use lighten(-value) instead.
Color
desaturateColor
Deprecated
Use saturate(-value) instead.
Color
fadeColor
Added
Merged fadeIn and fadeOut into one function.
Color
fadeInColor
Deprecated
Use fade(value) instead.
Color
fadeOutColor
Deprecated
Color
getTextColString
Deprecated
Use textCol() instead.
Color
greenNumber
Added
Gets the green value for a color.
Color
greenColor
Added
Sets the green value for a color.
Color
Added
Gets the hsl array for a color.
Color
hslColor
Added
Sets the tgb array for a color.
Color
Added
Gets the hue value for a color.
Color
hueColor
Added
Sets the hue value for a color.
Color
lightenColor
Updated
Updated to allow increase and decrease of lightness value.
Color
lightnessColor
Deprecated
Use lightness(value) with a value between 0 and 100 instead of 0 and 1
Color
lightnessNumber
Added
Gets the lightness value for a color.
Color
lightnessColor
Added
Sets the lightness value for a color.
Color
Added
Gets the red value for a color.
Color
redColor
Added
Sets the red value for a color.
Color
Added
Gets the rgb array for a color.
Color
rgbColor
Added
Sets the tgb array for a color.
Color
saturateColor
Updated
Updated to allow increase and decrease of saturation value.
Color
saturationColor
Deprecated
Use saturation(value) with a value between 0 and 100 instead of 0 and 1
Color
saturationNumber
Added
Gets the saturation value for a color.
Color
saturationColor
Added
Sets the saturation value for a color.
Color
setHSLColor
Deprecated
Use hsl(value) instead.
Color
setRGBColor
Deprecated
Use rgb(value) instead.
Color
toArrayArray[Number]
Deprecated
Use rgb() or hsl() instead.
0.9.0
Color
Removed
Use one of the hx.color functions to create Color instances.
hx.colorColor
Added
Constructs a new Color instance.
hx.colorColor
Added
Constructs a Color instance from a string. If the string passed in is not valid then this function will return undefined.
hx.colorColor
Added
Constructs a Color instance from an array.
hx.colorColor
Added
Constructs a Color instance from a list of rgb values.
hx.color(255, 255, 255)
hx.color(255, 255, 255, 1)
hx.color.isColorStringBoolean
Added
Checks if a string is a css color string.