Searching the SFO Museum Aviation Collection website by color

Searching the SFO Museum Aviation Collection website by color

The search-by-color functionality works by taking an input color, represented as a hexidecimal string, and then “snapping” it to its nearest match on a fixed palette of colors. The RGB color space contains over 16 million individual colors so searching for exact matches will usually yield too few results to make searching by color useful. By “bucketing” all those millions of colors in to a fixed set of a couple of hundred colors, a “palette”, things start to get interesting.

This is a blog post by aaron cope. It was published on June 16, 2025 and tagged collection, search, color, api and webassembly.