1.0.3 • Published 4 years ago

@albamyrtaj/colorsearch v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

��## Functions <dl> <dt><a href="#setOpacity">setOpacity(hexColor, opacity)</a></dt> <dd><p>Set the opacity of a hex color</p> </dd> <dt><a href="#fromColorStringToRGBA">fromColorStringToRGBA(stringColor)</a></dt> <dd><p>Convert a string color to an RGBA color</p> </dd> <dt><a href="#getContrastingColor">getContrastingColor(hexColor)</a></dt> <dd><p>Given a hex color, return the color that would be the opposite of that color</p> </dd> </dl> <a name="setOpacity"></a> ## setOpacity(hexColor, opacity) Set the opacity of a hex color Kind: global function Returns: The hex color with the opacity applied. | Param | Description | | --- | --- | | hexColor | the hex color code without the alpha value. | | opacity | The opacity of the color. This is a value between 0 and 1. | <a name="fromColorStringToRGBA"></a> ## fromColorStringToRGBA(stringColor) Convert a string color to an RGBA color Kind: global function Returns: The RGBA values of the color. | Param | Description | | --- | --- | | stringColor | The color string to convert. | <a name="getContrastingColor"></a> ## getContrastingColor(hexColor) Given a hex color, return the color that would be the opposite of that color Kind: global function Returns: a hex color code with the opposite color. | Param | Description | | --- | --- | | hexColor | The hex color to convert to a contrasting color. |