Methods
-
<static> getRGB( color ) → {array}
-
Description
Will get the red green and blue values of any color string.
Parameters
Name Type Description color
string 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 color
string Can be in any of these formats: #fff, #ffffff, rgb, rgba
percent
number 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 color
string Can be in any of these formats: #fff, #ffffff, rgb, rgba
percent
number 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 color
string Can be in any of these formats: #fff, #ffffff, rgb, rgba
alpha
number alpha level for the new color
Returns
Details