Function: getReadableTextColor()
ts
function getReadableTextColor(background): string;Returns '#000000' or '#ffffff' — whichever is more readable on top of the given background hex color.
Parameters
| Parameter | Type |
|---|---|
background | string |
Returns
string
Example
ts
getReadableTextColor('#336699') // => '#ffffff'
getReadableTextColor('#ffff00') // => '#000000'Since
1.0.0