bgrins / TinyColor

Fast, small color manipulation and conversion for JavaScript
https://bgrins.github.io/TinyColor/
MIT License
5.05k stars 438 forks source link

Constantin algorithm : index out of range ? #213

Closed Chappitono closed 4 years ago

Chappitono commented 4 years ago

Hi,

I just wanted to share a potential bug in the constantin algorithm :

var baseTriad = tinycolor(hex).tetrad(); => returning something like [0, 1, 2, 3]

And later, when computing the accent colors :

getColorObject(tinycolor.mix(baseDark, baseTriad[**4**], 15).saturate(80).lighten(65), 'A100'),

image

=> baseTriad[4] is undefined.

I don't know if that is a bug, though.

Chappitono commented 4 years ago

wrong project sorry