@manta-eu/lib/color
Reference for @manta-eu/lib/color as it is on main.
Type Aliases
HexColor
HexColor =
`#${string}`
RGBColor
RGBColor =
object
Properties
b
b:
number
g
g:
number
r
r:
number
Functions
capBrightness()
capBrightness(
hexColor,maxBrightness?):string
Parameters
hexColor
`#${string}`
maxBrightness?
number = 150
Returns
string
generateHexColorBasedOnName()
generateHexColorBasedOnName(
name):object
Parameters
name
string
Returns
object
color
color:
string
contrast
contrast:
string
getAgeColor()
getAgeColor(
date):string
Parameters
date
DateArg<Date>
Returns
string
getAverageColor()
getAverageColor(
ctx,width,height):RGBColor
Parameters
ctx
CanvasRenderingContext2D
width
number
height
number
Returns
hexToRgb()
hexToRgb(
hex):RGBColor
Parameters
hex
`#${string}`
Returns
isHexColor()
isHexColor(
value):value is `#${string}`
Parameters
value
string
Returns
value is `#${string}`
rgbToHex()
rgbToHex(
__namedParameters):`#${string}`
Parameters
__namedParameters
Returns
`#${string}`