Members
-
<static> CSSToRGBA
-
Converts between style, i.e. rgb()/rgba()/etc, and RGBA values. IMPORTANT: this method has a relatively higher performance cost, avoid when possible.
- Source:
Methods
-
<static> hexToRGBA(hex)
-
Converts between hex and RGBA values.
Parameters:Name Type Description hexNumber hex color value. - Source:
-
<static> linearGradient(minX, minY, maxX, maxY, colors)
-
Creates canvas linear gradient fillStyle.
Parameters:Name Type Description minXNumber x position of start of gradient. minYNumber y position of start of gradient. maxXNumber x position of end of gradient. maxYNumber y position of end of gradient. colorsArray list of colors in CSS style #000000 / rgb() / rgba() or object {r:0,g:0,b:0,a:0} format. - Source:
-
<static> radialGradient(radius, colors) → {Gradient}
-
Creates canvas radial gradient fillStyle.
Parameters:Name Type Description radiusNumber radius of gradient colorsArray list of colors in CSS style #000000 / rgb() / rgba() or object {r:0,g:0,b:0,a:0} format - Source:
{ Gradient } canvas 2d gradient -
<static> RGBAToCSS(r, g, b, a)
-
Converts r,g,b,a values to rgba() CSS style.
Parameters:Name Type Description rNumber red value from 0 to 1. gNumber green value from 0 to 1. bNumber blue value from 0 to 1. aNumber alpha value from 0 to 1. - Source:
-
<static> RGBAToHex(r, g, b, a)
-
Converts r,g,b,a values to hex color.
Parameters:Name Type Description rNumber red value from 0 to 1. gNumber green value from 0 to 1. bNumber blue value from 0 to 1. aNumber alpha value from 0 to 1. - Source:
-
<static> RGBToCSS(r, g, b)
-
Converts r,g,b values to rgb() CSS style.
Parameters:Name Type Description rNumber red value from 0 to 1. gNumber green value from 0 to 1. bNumber blue value from 0 to 1. - Source:
-
<static> RGBToHex(r, g, b)
-
Converts r,g,b,a values to hex color.
Parameters:Name Type Description rNumber red value from 0 to 1. gNumber green value from 0 to 1. bNumber blue value from 0 to 1. - Source:

Impact++