-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Index out of range: baseTriad[4] #109
Comments
Hey there @Blaaznar ! Thank you for your report! This has recently been fixed in this PR: #105 I've got this deployed now to the tool, here: http://mcg.mbitson.com/ Please let me know if you notice anything else! Thanks again! |
Observing the latest source code, the issue is still present. case 'constantin':
var baseLight = tinycolor('#ffffff');
var baseDark = $scope.multiply(tinycolor(hex).toRgb(), tinycolor(hex).toRgb());
var baseTriad = tinycolor(hex).tetrad();
return [
getColorObject(tinycolor.mix(baseLight, hex, 12), '50'),
getColorObject(tinycolor.mix(baseLight, hex, 30), '100'),
getColorObject(tinycolor.mix(baseLight, hex, 50), '200'),
getColorObject(tinycolor.mix(baseLight, hex, 70), '300'),
getColorObject(tinycolor.mix(baseLight, hex, 85), '400'),
getColorObject(tinycolor.mix(baseLight, hex, 100), '500'),
getColorObject(tinycolor.mix(baseDark, hex, 87), '600'),
getColorObject(tinycolor.mix(baseDark, hex, 70), '700'),
getColorObject(tinycolor.mix(baseDark, hex, 54), '800'),
getColorObject(tinycolor.mix(baseDark, hex, 25), '900'),
getColorObject(tinycolor.mix(baseDark, baseTriad[4], 15).saturate(80).lighten(65), 'A100'),
getColorObject(tinycolor.mix(baseDark, baseTriad[4], 15).saturate(80).lighten(55), 'A200'),
getColorObject(tinycolor.mix(baseDark, baseTriad[4], 15).saturate(100).lighten(45), 'A400'),
getColorObject(tinycolor.mix(baseDark, baseTriad[4], 15).saturate(100).lighten(40), 'A700')
];
Still scratching my head how on earth does this work at all??? Btw, generated accent colors don't resemble much the default accent colors generated by Material algorithm (ie. red, indigo, blue...). |
Returns no errors but seems to be a bug:
var baseTriad = tinycolor(hex).tetrad();
This returns a zero based array 0-3:
baseTriad[4]
is thus out of range and returns undefined.The text was updated successfully, but these errors were encountered: