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.
Currently the
isDarkandisLightis determined by checking the brightness against a static128value, however it would be nice to be able to adjust this value(I've found, for example, that170fits 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.