Hacker News new | past | comments | ask | show | jobs | submit login
Google, but for colors (picular.co)
349 points by dcschelt on Aug 29, 2018 | hide | past | web | favorite | 102 comments

Very fun.

I put in some scientific proteins, and it spits out their common fluorescence staining colors:

ZO1 (stain tight-junctions, often blue): https://picular.co/zo1 (see https://www.google.com/search?tbm=isch&source=hp&biw=1399&bi...)

hN1 (a protein usually stained red or green with GFP or mCherry): https://picular.co/hn1 (see https://www.thermofisher.com/antibody/product/HN1-Antibody-P...)

In case anyone is wondering how this works, it does a google image search and then extracts the primary color of each result. That’s why you see unexpected colors like grey for “heart”: image search returns black and white hearts.

My first search for "apple" gives you a bunch of greys and a red is only the 8th result. There's more grey, beige, a blue, black, yellow, orange, but only one green and 5 reds total.

Searching "heart" at least gives you a red first and majority reds.

Right. If you do a google image search for apple, it'll show mostly grays because it's returning the Apple logo.

Try "apples instead", all red and a single lime green.

It's amusing having a background in software development and this is the first thought I had. (like many here I am sure would) I don't know exactly "why" this works, but knowing that it likely would before trying. (like hitting refresh when your web app barfs)

Someone else suggested cause of the apple logo... and it seems they are likely right. :)


Shows the "holes" in this method.

Yep. Works pretty well for terms that return highly relevant images. Try "baby poop", for example.

my search for apple in google returns only results somehow related to apple the company, so it would seem this is google, but for colors.

that's actually a pretty terrible way of handling it. There are libraries a' plenty that achieve this without scraping google.

that achieve what, exactly?

figuring out which colors to display based off a reference color.

but you're not giving it a reference color. you're starting with a word like "envy."

You can type nonsense words into this --- words for which Google will say no page in its entire corpus has a match --- and get color palettes back. What's it actually doing?

Looks like Google image search always has a fallback for a nonsense search query, and the images between Google and Picular exactly match (if you hover over the bottom-right of any color card, it shows the source image):



If you put it in quotes, though, Google gives no results and Picular crashes (500 internal server error from an XHR):



Fixed! There's now a color palette for "sdlkfjsldkfjsldfkj" ;)

What did you change?

My guess is you're still doing a Google Image search, but when it returns no results, you return something random and cache this query for consistency. Is that about right?.

Good guess! That's almost right, but there's no cache involved. Random colors based on a seed.

Are the palettes accurate? Did you try a Google image search?

Machine learning

I was kinda disappointed when I realized when you search it seems to basically only do a simple image search (ala Google) and return the primary color of the individual images, as can be seen by hovering over the small icon in each color result.

I would not really call that machine learning, since it's basically an image search engine with a color filter.

If that's what it's doing, how is it giving me colors for nonsense words?

I wonder if it's just automatically accepting the spelling suggestion Google provides for searches?

It's probably using Google custom search. I think that's the only way you can actually get Google search results as an API.

Perhaps custom search displays differing results?

You can scrape google.com with a lot of awkward ban evading.

The fact that it works for non existing search results shows that it's ML

well I typed in config and got nothing.

It's also filtering for safe search. So, there are results that are assuredly indexed by Google, but the query stalls the page.

If you try linking to https://picular.co/four+letter+words

...some of those four letter words won't return results, even if they do exist. Probably because they (futurememories.se) don't want to associate their product with lewd profanity, if/when people start sharing random links on social media.

Is the site getting overloaded with traffic? Nothing returns any results.

Edit: Left a search running for 10 minutes and got some colors.

It appears to be flummoxed.

I think so, it's not returning results for me either.

12 hours later and still doesn't work for me

Hug of death I guess

This is really cool, nice work!

I tried 'horse' (https://picular.co/horse) and I got some interesting results, some sky and grassy colours as well. Where do you get the photos from, and will searches give the same results every time or do they vary?

I think it works. I looked for "fog in san francisco" and it gave me a bunch of shimmering gray boxes that all look the same.

https://picular.co/love returned a nice color palette

pretty neat to search for the planets as well (e.g. https://picular.co/jupiter)

I also like that the favicon changes colors. Nice touch.

Looks similar to https://picular.co/hate

Searching for quarks or gluons did not result in colorless combinations. This website clearly doesn't conform to QCD.

Neither quarks nor gluons (in general) are colorless.

One should object, however, that the site returns colors for 'hadron' and 'meson' :).

Very interesting how "pride" returns the colors of the rainbow in order: https://picular.co/pride

It might be ordering the results by hue.

Also quite vivid: https://picular.co/neon

Not so vivid: https://picular.co/noir

Some nice colours as well: https://picular.co/pastel

Given there is no original picture overlay in that result, it actually seems to be hardcoded.

It's funny because if you scroll through Google images fast enough, you will catch glimpse of monochromatic placeholder images for images that haven't loaded yet. The placeholder image seems to be the average color (maybe with some object boxing to reduce contributions from backgrounds and such) inside the image. This website is kind of the opposite in that it presents the placeholder color as if it were the content itself.

Apparently the colors come from the images in Google Images search results.

In the bottom right of each color is a button that reveals the image where the color is sourced from.

Doesn't work out of the box with tracking protection in browsers enabled. So I don't see any color and I guess I don't have to.

Loved the idea and well implemented. Is it open source, like to add a feature to it. Could you also care to share about the underlying algorithm ?

Seems to be doing a google image search and take the average color. Meh.

EDIT: My "meh" is not bashing on the author or anything, at least they actually made a project, all I've done this past while is browse HN and make half-baked terminal apps. It was more of a let-down because I thought this was a very cool idea and was interested in a sophisticated implementation of it.

Ahh much simpler than I thought (fancy NLP and such :)

Meh indeed.

I don't know why but this reminded of Guess-The-Google[0] where you get a series of images and you have to guess the search word that generate them.

Sadly, I couldn't find any playable version of it.

[0]: https://www.onlymelbourne.com.au/guess-the-google

Could this be implemented by doing a google image search for whatever the user enters. Then show the average color of each image.

That's exactly how it's implemented. You can hover over the pictures' corners to show the original image.

I just tried "love" and "hate" - the first three results were very similar shades of red.

Love and hate are pretty similar, both are passionate emotions. We just need to remember that, and then it's easy to choose the right one.

Neat! No greens returned in https://picular.co/christmas but OTOH I just created palettes called Retro and Grunge for a recent project and they were quite similar to Picular’s choices

I found some nice greens: https://picular.co/marijuana -- Have a MERRY CHRISTMAS! (There, I said it.)

Considering this apparently uses Google images, it would probably be improved if you add "_ color" to the end of every search.

For christmas this seems to be the case.

Interesting. Same for "cash" or "money".

dollar does get green, perhaps it's just not US-centric?

I put in bisexual. It returned those colors, but also returned the colors for the pansexual pride flag. https://picular.co/bisexual

I wonder what kind of magic is going on under the hood.

I searched blue and it returned some tan and green colors (but not bluish green or greenish blue).

I searched naked, expecting skin colors (I was wondering if it would tend to show "white" skin colors instead of a range of skin colors). The results were... strange.

if you search "skin" you get more or less anticipated results. I think it's using safesearch-filtered results, so "naked" isn't likely to return any actual naked bodies.

If you are really looking for colours and palettes with a theme you are much better off with the groupthink at sites like https://www.colourlovers.com/

That the icon changes color is a nice touch. I can see this being useful in generative art.

I really like this! Searching for 'sea foam green' gave me exactly what I thought.

That being said, personally, I would prefer something original instead of "Google, but for colors.". just my two cents.

A very good example how engaging and useful a simple idea can be! Now the source images are also shown in the results!

I do not think it uses any AI/ML, the beauty is in the simplicity of the solution. Awesome!

Not loading anything for me.

I was super slow for me. Wonder what is going on in the background?

Would be nice instead of just colours it gets a selection of palettes.

You can try the one of these sites for that:



There are some other sites that do similar searches as well, just can't remember them off the top of my head :)

Doesn't work for me: the boxes never load. I searched for potato.

http://www.colr.org/ does something very similar.

https://picular.co/the+matrix gives the expected greens, but not as the first result sadly.

Nice. I tried Formula 1 constructors, and all those that I tried matched their liveries. Force India returned some pinks, Ferrari returned some reds, and McLaren some orange.

No offense, but I expected more orange: https://picular.co/trump

I love this! It's really fun, and will be really useful for when I'm making something and can't find a specific color.

Brilliant and colorful idea! Really love this!

It seems to me like when I type in company names, I don't get the exact colors they use in their branding...

I put in "macbook" and it didn't return gray or black. Think the machine learning needs some tweaking

I typed fall colors and got a bunch of shades of orange, tans, yellows and browns. One blue tile in there as well...

It seems to return blue for pretty much anything ("cat", "man"), maybe because of blue sky?

I tried searching for "picular.co", and to my disappointment it did not melt down the website.

well, I just tried https://picular.co/hackernews which gives lots of orange, but doesn't seem to give me the color I get when I use a color picker on the top bar of FD6423

Keeps showing Broken Website Gray now

I want to take all the main colours in my house and get a word back! Someone work on it now.


return "beardyw's house"

Any idea on how they obtain the underlying images? It seems like a huge pre-trained database.

Interesting to see #0432CA for "human", and #3CA4D4 for "person".

Crashes half of the time, I guess it did not scale enough to handle Hacker News

Looking for "orca" I was expecting black and white, but got only blue.

I typed in "Trump News" and I got a bunch of Fake Colors, none of which were anything like the correct shade of orange. They're shadow banning orange colors and right wing red colors, only showing dark left wing blue shades!!! Why are they censoring all the warm positive Trump colors??? All colors matter!!!

Is your backend doing a google search? Wont you get blocked...

Nice Easter egg (I assume) for "chess" ;)

It cannot do "lego"

But maybe it's just hug of death..

okay. "lego" looks like "google"

I like how the first result for black is #040404.

Cool! Reminds me of xkcd's color survey results: https://xkcd.com/color/rgb/

Anyone typed in penis yet ?

This is SUPER DUPER cool!

I'm making sounds in my throat like I'm a cat.

queries: ennui, glee, barack obama, donald trump, puppies, kittens, paris, kolkata, yosemite, death valley

the machine has lots to learn.

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