Open
Description
using isDark() or isLight() fails to discern light or dark colours.
These are based on getBrightness()
getBrightness calls private function _fixRGB pRGB
private function _fixRGB pRGB returns text triplet
getBrigthness pRGB expects an array but calls _fixRGB which returns a triplet!
So then in getBrightness fails because tRBG is a text triplet, but getBrightness uses this as an array:
return (tRGB["r"]* 299 + tRGB["g"]* 587 + tRGB["b"]* 114) / 1000
Metadata
Metadata
Assignees
Labels
No labels