HTML Color OneBox #

Work is the sort of place that cares about specific colors, so HTML color hex triplets come up in conversation quite often. Neil suggested that this should be a OneBox in search results. It occurred to me that this could done via the Subscribed Link feature that we offer for search results. It turned out that subscribed links can use gadgets, which meant that an inline preview of colors was even possible. Regular expression matching also meant that I didn't have to list out every color by hand. This page has more information on the OneBox, or you can subscribe directly.

Color OneBox preview

Once you have installed this, you can search for things like #fafafa or #ccc and get an immediate preview (in fact, the # can be omitted).

4 Comments

What would be really cool is a small note somewhere in your preview or below it that would convert the hex into the RGB triplet and vice versa, e.g. you enter #CC0000 and it returns rgb(204,0,0). For instance, I'm sometimes looking to paste an RGB color definition into an interface which only accepts hex-values.

(I once did something like that and have it installed too, it also comes with color previews, but that was years ago as a Windows app.)
It's good to see you are still making the internet a better place. Thanks!
Sweet HTML nerdiness. Thanks!
Cool! Philipp's suggestion is good, it may be useful too to have RGB values.

Post a Comment