Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Experimental “Text-To-Color” engine I wrote for fun (berkin.me)
20 points by TheBerkin on Sept 27, 2015 | hide | past | favorite | 44 comments



I tried vermilion and got nothing, so googled to check my spelling was correct and came across Wikipedia colour descriptions: https://en.wikipedia.org/wiki/Vermilion

You might wish to make the corpus self-expanding, and for a given word do Wikipedia (or other source) lookups to see whether structured information on the colour exists.

There are whole lists of colours on there: https://en.wikipedia.org/wiki/List_of_colors:_A%E2%80%93F

Of course, it would require the addition of attribution for wherever you obtained the data.

Oh, and welcome to subjectivity... battleship grey, it's changed over the years but the commonly accepted one is the WW2 era grey which featured a touch more blue and is RAL 7031 ( http://www.ralcolor.com/ - which btw, is another source ).

PS: And it doesn't know the difference between blood and dried blood.


> You might wish to make the corpus self-expanding, and for a given word do Wikipedia (or other source) lookups to see whether structured information on the colour exists.

One interesting method would be to google image search the keyword, and see if the focus of the majority of the images (center of image maybe?) have the same color and pick that


Thanks, this is really helpful. Looks like I'll be adding a lot of new filters.

It's not just a simple color mixer; it's actually a "filter compositing engine". I write rules for each keyword by hand, currently. It gives me more control over how different words affect the final color.

(I'll add a rule for dried blood)


It gets "vermillion" which I assumed was the UK spelling, but my spell-checker disagrees.

Incidentally, I tried the other Pokemon cities, and it only gets 3 out of 8 (Cerulean, Fuchsia and Vermillion[sic]).


You might also want to have a look at the file /etc/X11/rgb.txt


It doesn't know chartreuse. Well, OK, but it doesn't know lime or lemon either.


aqua, no aquamarine.


A quick idea to improve coverage using word vectors, with my NLP library spaCy ( http://spacy.io ):

https://gist.github.com/honnibal/664cf54cb30c48c0c977

Example output: aquamarine umber turquoise red-orange coppery malachite ochre russet blue-violet fuchsia butterscotch lilac tortoiseshell mother-of-pearl

I thought it'd be fun to see whether I could get the shade of the color from the vectors, but so far no luck. Probably vectors trained for image captioning would work, though.


Could this use http://blog.xkcd.com/2010/05/03/color-survey-results/ as a dataset to turn text-to-color?


This was actually the inspiration for the project.


I typed "Cerulean" (a shade of blue) and didn't get anything.


I tried puce, mauve, aqua and got nothing for them.


Typed azure, got no result either.


Added.


I've never heard that word before in my life. Will add!


You could try to automate, get some images from a search engine for given phrase and try to average the color.

I would probably do an average and then for each image cut off say 20% colors that are most away from the average, and then average that.


That's a cool idea, though I don't know any search engine APIs that don't have a ton of restrictions on them. Google used to have a wonderful image search API, but it's either deprecated/discontinued by now.

I'll keep looking around, though.


heres a decent list: https://msdn.microsoft.com/en-us/library/system.drawing.colo... (other than R, G, B, A)


Also no burgundy, blonde and many more.


Shameless plug: Nothing like this but something I made that spews colors according to text. You can play with it for 12 seconds and forget it :)

https://github.com/chanux/summershades


Apologies if this causes any offence, but I was intrigued to find "semen" and "jizz" result in two different colors. I suspect investigating similar differences would be a way to reverse engineer the technique.


I have a similar engine up at http://joelcalifa.com/colors

Mine can also do colors like "banana" or "bubblegum". Pretty simple to put together actually. Rather than manually putting together a list of colors, I just use the ColourLovers API. You can also use up and down arrows to move between results or the return key to "make a poem," which I fully agree was a weird feature to add.


"evil minions" are not yellow. Did you know that? :D


Neat. It would be helpful if you could go in the opposite direction (enter RGB values and get the name of the closest color). I find that when I'm making a chart or graph and I cook up some color in GIMP, I don't know how to refer to that color in the text of the document that references the chart.


Or you could try to relate text to emotion and then the emotion to color.

If speech to text is more evolving this project could constantly display a color to express the emotion of people. Very expressive and cool, I think.

Needs some research, yes :-) But I am pretty sure that if you crack this, its something you can make good money from.


Would be great if you could add an auto-complete on the supported keywords.

This way the user could explore and not get disappointed if his/her keywords aren't supported.


Check a very simple one http://output.jsbin.com/vufetemozi


No taupe? No periwinkle? Teal isn't teal? Pls.


Would be cool to support other spoken languages too, or otherwise if it doesn't recognize a word, take the nearest word it knows :)


Great idea. I only speak English and (some) German, but I'll see what I can do to accommodate color names in other popular languages.


I tried my standard 'goto' for color tests: "baby shit".

WTF, it worked?! Amazing.


The modifiers are abundant. Also try the "dog", "alien", "old", "dark", and "rotten" varieties. That's just scratching the surface.

Those modifiers work on any other base colors, as well. They even stack. Want "old dog shit"? I have just what you need.


I tried shit and it worked. Tried baby shit expecting same color and it was different. I like attention to detail here :)


I expected something that would extract a color off Google Images in the background.


That was the plan at first, but I wanted even oddly specific requests to return something somewhat reasonable, so I went with a word analysis method that associates certain words with filters that are added from right to left.

Not nearly as neat or all-encompassing as something like what you describe, but it does allow me a bit more control over how different words affect the output.


Tried "shit" and got exactly the color I expected lmao. Cool project.


Beige doesn't work.


Cool idea. Tried Crimson and Sage but didn't see results


didn't get chartreuse, tangerine or rust


nice, maybe users can submit a word, say "fucked up" and a related color value to add to your database


Still can't handle "ochre".


"the complement of red" - red


Chartreuse isn't there...


At least poo works.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: