-
Notifications
You must be signed in to change notification settings - Fork 438
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
Polyad colors #126
Polyad colors #126
Conversation
Adds functionality to not only get triad and tetrad colors from a color but also n-ad colors using n as an argument. n = 3: triad, n = 4: tetrad, n = 5 pentad, etc...
Added more convenience functions like the existing triad and tetrad.
bugfix
I was a bit messy with my first two commits, because I copy pasted it from code I currently use. Hence the two follow up commits with fixes to these two forgotten characters (, and ;). |
Alright, sounds good. I'd rather only export triad and tetrad (and not export all the others), but then expose the new one that allows a variable number of outputs. I believe we could call it 'polyad', which is what I could find as the name for these groupings: https://en.wiktionary.org/wiki/polyad |
Done |
Internal refacx as per bgrins#126 (comment)
Forgot about the internals... done |
This sounds like a cool idea. These need to pass triad: function() {
return this._applyCombination(triad, arguments);
},
tetrad: function() {
return this._applyCombination(tetrad, arguments);
},
polyad: function() {
return this._applyCombination(polyad, arguments);
}
...
function triad(color) {
return polyad(color, 3);
}
function tetrad(color) {
return polyad(color, 4);
} |
Landed this in #250. Thanks @jpwesterhof and sorry for dropping this |
but also n-ad colors using n as an argument. n = 3: triad, n = 4:
tetrad, n = 5 pentad, etc...