Methods
-
<static> getRGB( color ) → {array}
-
Description
Will get the red green and blue values of any color string.
Parameters
Name Type Description colorstring the color to obtain the red, green and blue values of. Can be in any of these formats: #fff, #ffffff, rgb, rgba
Returns
Details
-
<static> darkenColor( color, percent ) → {string}
-
Description
Will get the darken the color by a certain percent
Parameters
Name Type Description colorstring Can be in any of these formats: #fff, #ffffff, rgb, rgba
percentnumber percent to darken the color by (0-100)
Returns
Details
-
<static> lightenColor( color, percent ) → {string}
-
Description
Will get the lighten the color by a certain percent
Parameters
Name Type Description colorstring Can be in any of these formats: #fff, #ffffff, rgb, rgba
percentnumber percent to lighten the color by (0-100)
Returns
Details
-
<static> rgbToAlpha( color, alpha ) → {string}
-
Description
Converts a color to rgba format string
Parameters
Name Type Description colorstring Can be in any of these formats: #fff, #ffffff, rgb, rgba
alphanumber alpha level for the new color
Returns
Details