mercredi 4 mars 2015

pleasing palette random color generation

Using javascript, I've created a 1000px x 1000px canvas that on "play" fills itself with random-sized, random colored rectangles. Fun, but garish results. To refine it further, I'd like it to lock onto some kind of color palette determined perhaps by its first iterations, then stay loosely with that for the entire play. I'm thinking then to let it make "serendipitous" odd-ball choices, but only if the rectangle is small, i.e. a tiny accent color. But I can figure that out later on my own. I found a highly-voted generator here that's interesting, but the author wrote it in Java. Unfortunately, I'm still a noob at javascript(!) Can someone show me how to translate it? Alternate suggestions are welcome. I'd be happy to share my script if I can figure out where I should publish it. No doubt there'd be numerous suggestions on bettering my code... Here's the generator I'm referring to: Algorithm to randomly generate an aesthetically-pleasing color palette Many thanks in advance!





Aucun commentaire:

Enregistrer un commentaire