Lurker News

Comments (52) 19 threads

Earlier comments
fgGAMI1 reply#
Can you get a suggested color palette by API call?
Jack000#
sure, you could just use the same API the main website does, it's unauthenticated:

  curl 'http://colormind.io/api/' --data-binary '{"model":"default"}'

  curl 'http://colormind.io/api/' --data-binary '{"input":[[44,43,44],[90,83,82],"N","N","N"],"model":"default"}'
keep in mind this is hosted on a single Linode 4096, and there's no SLA or anything :] It's handling the HN spike pretty well so far though.

also the models are rotated daily (ie. different ones are available each day), with the exception of "default"

imh1 reply#
Why GANs for this?
jcoffland1 reply#
My question as well. There are several other great implementations of a color pallet generator which use color theory rules. My bet is that the GAN, in this instance, boils down to little more than a pseudorandom number generator.
Jack0002 replies#
I think color theory alone isn't enough to produce good color palettes. eg. try going to https://color.adobe.com and choose one of the color rules, then go to https://color.adobe.com/explore and compare with user-contributed palettes. There's a huge difference imo.

As for why a GAN specifically, I talk a bit about that in one of the blog posts. Neural nets trained with L1/L2 loss tend to produce "averaged" colors, dull greys and browns. The learned loss from a GAN allows the output to take on more extreme values.

jcoffland#
You could solve the averaging problem by applying the L1/L2 trained net to exponential color gradients rather than linear ones. By doing so you are telling the NN that humans care about exponential changes in color because that's how our eyes work. E.g. we notice if you double the amount of green but probably not if you just increment it.

I think there are rather simple solutions to these types of problems. But sometimes everything looks like a nail.

imh2 replies#
Why neural nets though? It seems like total overkill compared to simpler statistics.

Continue this thread — 2 replies

vtange#
I can see a lot of utility in this. Great job!

Is this limited to generating palettes of 5 colors? Sometimes all 5 won't be needed, wouldn't that make the output a little less useful since the algorithm considers how each of the five interacts with the others.
If I only needed two colors, I wouldn't need those two colors to work against three other colors.

chias1 reply#
This looks great!

Did you have any thoughts with regards to releasing it as open source so that we could run our own instances with the various training sets? I note that you appear not to be monetizing it at all, so I figured I'd pop the question :)

Jack000#
the GAN is actually just pix2pix: https://github.com/phillipi/pix2pix I just resized the convolutional layers to 1px height since the vertical dimension isn't that relevant in this case.

I do have a few bash scripts for color extraction that I could upload to github, although they're pretty quick and dirty.

Load more comments