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
Currently the isDark and isLight is determined by checking the brightness against a static 128 value, however it would be nice to be able to adjust this value(I've found, for example, that 170 fits my needs better). Potentially add an option in the constructor, maybe as part of TinyColorOptions: {brightnessThreshold: number}.
I'm aware that you can get around it by doing const isDark = tinyColor.getBrightness() < 170;, but this proposal would allow the user to create a wrapper around TinyColor, and have a default brightness threshold across the entire app, and not have to manually specify it every time.
The text was updated successfully, but these errors were encountered:
Currently the
isDark
andisLight
is determined by checking the brightness against a static128
value, however it would be nice to be able to adjust this value(I've found, for example, that170
fits my needs better). Potentially add an option in the constructor, maybe as part ofTinyColorOptions: {brightnessThreshold: number}
.I'm aware that you can get around it by doing
const isDark = tinyColor.getBrightness() < 170;
, but this proposal would allow the user to create a wrapper around TinyColor, and have a default brightness threshold across the entire app, and not have to manually specify it every time.The text was updated successfully, but these errors were encountered: