You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the input string is rgb, then filter it through a lib like https://www.npmjs.com/package/rgb-hex before computing the font color.
This way clients can assume any valid CSS color string is also a valid input to this lib and clients can avoid having logic in their own code which checks the color string's contents.
The text was updated successfully, but these errors were encountered:
Ts verification is already performed in many steps, both for string inputs and numeric inputs. The only thing is that when it fails a default value is returned (#ffffff) instead of an error.
I'll think of a way to see if it would be possible to return an error without breaking the existing API.
If the input string is rgb, then filter it through a lib like https://www.npmjs.com/package/rgb-hex before computing the font color.
This way clients can assume any valid CSS color string is also a valid input to this lib and clients can avoid having logic in their own code which checks the color string's contents.
The text was updated successfully, but these errors were encountered: