graypegg / chromatism

:rainbow: A simple set of utility functions for colours.
1.78k stars 37 forks source link

invert is broken when r/g/b is 0 #45

Open hjri opened 5 years ago

hjri commented 5 years ago

invert('#000000').hex should give #FFFFFF but gives #000000, similarly invert('#EE00EE').hex should give #11FF11 but gives #110011