Live data from Hacker News

Show HN: A Color Palette Generator I Built For My Senior Thesis

colormoo.com

31–40 of 45 posts

Re: Show HN: A Color Palette Generator I Built For My Senior Thesis

#31
For those that want to do this on iOS, I created a handy UIColor (or NSColor if OSX dev is your thing) category that can create 5 tone color schemes by passing in one color.

https://github.com/bennyguitar/Colours

Beyond the color scheme part, another cool thing you can also do is find distances between colors using CIE_LAB specification. This is great for finding "like" colors on the fly.

Re: Show HN: A Color Palette Generator I Built For My Senior Thesis

#32

Does the algorithm use HSL as its color space? I've seen many online palette tools that use HSL color wheels for picking colors. It never made sense to me why they wouldn't use a perceptually uniform color space like CIELUV. I actually made a color space derived from CIELUV specifically for the task of picking colors [1]. I never wrote a 'proper' palette generator using it, but I did make a demo that works pretty wel…

HUSL is awesome. Wrote a library last year that uses it: https://github.com/nluqo/autumn

Re: Show HN: A Color Palette Generator I Built For My Senior Thesis

#33
post #4

Picking colors is an interesting problem at the boundary of what can be done algorithmically with satisfactory results. For my latest side project, I needed sets of up to 5 colors that go well together but are sufficiently distant not too be confused. Since this is the task that palette generators typically set out to achieve, I tried a couple of them [1,2], as well as some "hand crafted" palettes found on design blo…

I wonder if you could train a machine learning algorithm on 20th-century paintings? ;)

Re: Show HN: A Color Palette Generator I Built For My Senior Thesis

#34

I posted something similar a while back... http://www.rgbhexcode.com

Your CSS is a little broken in chrome v34, the black box that overlays when you mouse over colors are about 15px to low and kinda screw things up the lower down the page you go...

Re: Show HN: A Color Palette Generator I Built For My Senior Thesis

#35
post #23
post #18

Earlier quoted context omitted.

That's pretty rad. Is the source available anywhere? I'd like to see something like this for Sublime.

You can download the TextMate theme file for the colour scheme you generate. You can use the tm file directly in Sublime.

Oh nice, I wasn't aware of that. Thanks!

Re: Show HN: A Color Palette Generator I Built For My Senior Thesis

#36
Thanks for the feedback everyone. Perhaps I should have included a bit more explanation.

I was primarily interested in an algorithmic approach to generating color palettes. I am familiar with the various tools available (Adobe Kuler being my favorite) that use color theory as a basis of providing colors to go with one that you've selected (i.e. complimentary colors, analogous colors, triadic colors). One the palettes that my app provides uses this approach.

Another approach I looked at was a trick that I've seen many designers use in which you "mix" a little of the color you want to use with another color. To play with this concept, I generate a random set of colors and blend it with the one that you've selected.

Finally, I am a huge fan of Gregor Aisch's work [1] with colors in regard to statistics. My third palette borrows a method of his that I had not seen elsewhere. He essentially maps a particular color space into two dimensions and keeps the third constant. You can sample equidistant colors along a line in that space to derive a set of colors that look good together. In my case I used HSL, where I hold Lightness constant (I use the value of lightness of the color you selected).

As he mentions in the post I've linked below, HSL is not necessarily the best color model to use this way. A more perceptually uniform color space like CIE LAB would be better. However, working with this space in this way is a little more complicated because, since this color space models how we perceive colors, it has holes. I had trouble finding an elegant way around those holes such that I could consistently offer a fourth palette.

Anyway, after looking at each of these methods, I was curious if any one of them would rise to the top as the favorite among users. Or, perhaps one method would perform better for some colors over others. I am in the midst of processing all this data and my thesis should be published within the next month. Thank you for helping me collect data!

[1] http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/

Re: Show HN: A Color Palette Generator I Built For My Senior Thesis

#37

Does the algorithm use HSL as its color space? I've seen many online palette tools that use HSL color wheels for picking colors. It never made sense to me why they wouldn't use a perceptually uniform color space like CIELUV. I actually made a color space derived from CIELUV specifically for the task of picking colors [1]. I never wrote a 'proper' palette generator using it, but I did make a demo that works pretty wel…

Thank you for creating HUSL! I discovered it as I was midway through my project. I am very glad that this exists! I agree, CIELUV or CIELAB would probably be a better fit. As I mention in my comment above, it wasn't immediately clear to me how I would generate a palette using the space given the holes, especially since I allow the user to choose any color they want.

I am curious, how would you approach generating a palette using these color spaces?

Re: Show HN: A Color Palette Generator I Built For My Senior Thesis

#38

with all due respect, and only for whatever it's worth, every palette it generated is worse than any palette i found on colourlovers.com. but cool project. :)

Proof, I suspect, that humans are still better than computers. Or at least better than my computers. For now.

Re: Show HN: A Color Palette Generator I Built For My Senior Thesis

#39
post #3

Not working in Chrome on OS X. Seems to look ok in FF and Safari although I am not sure where the input for color is supposed to be positioned, it looks out of place. I see you used Zerb Foundation, how did you like it I am thinking of using it on a side project. Edit: Working in Chrome after a few refreshes.

Thanks for noting that!

I'm a big fan of Foundation, although if I wasn't trying to get this together so quickly I might have used something like Skeleton[1]. But I'm sure that is another discussion thread entirely ;)

[1] http://www.getskeleton.com/

Post reply on HN