1.0.3 • Published 2 years ago

@nicologiuggiola/color-utilities v1.0.3

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

��## Functions

setOpacity(hexColor, opacity)

  • Set the opacity of a hex color

Kind: global function
Returns: The hex color with the opacity applied.

ParamDescription
hexColorthe color you want to change opacity for.
opacityThe 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.

ParamDescription
hexColorThe 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.

ParamDescription
stringColorThe color to be converted to a contrasting color.
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago