1.0.2 • Published 3 years ago

@fubaars/color-utility v1.0.2

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

��## Functions

setOpacity(hexColor, opacity) ���

Set the opacity of a hex color

Kind: global function
Returns: The hex color with the opacity added to the end.

ParamDescription
hexColorthe hex color code without the # symbol
opacitya number between 0 and 1

fromColorStringToRGBA(colorString) ���

Converts a color string to an rgba string

Kind: global function
Returns: The RGBA values of the color.

ParamDescription
colorStringThe color string to convert to an RGBA value.

getContrastingColor(hexColor) ���

Given a hex color, return the color that would be the best contrast

Kind: global function
Returns: a string.

ParamDescription
hexColorthe hex color code to convert to a contrasting color.