1.0.3 • Published 2 years ago
@nicologiuggiola/color-utilities v1.0.3
��## Functions
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 color you want to change opacity for. |
opacity | The opacity of the color. This is a value between 0 and 1. |
fromColorStringToRGB(hexColor)
Convert a hex color string to an rgba string
Kind: global function
Returns: a string that represents the color in rgba format.
Param | Description |
---|---|
hexColor | The hexadecimal color string. |
getContrastingColor(stringColor)
Given a string color, return the color that would be displayed if the background were that color
Kind: global function
Returns: a string of either black or white.
Param | Description |
---|---|
stringColor | The color to be converted to a contrasting color. |