Hello!
I'm working on an
demo application with Instantsearch where I can search through the entire Resene catalog of colours (approximately 3300 of them).
I can currently search for them by name so users can visually pick a colour to learn more about that particular colour.
But one common request is being able to search by a hex code. While I can do this easily enough with
existing colours, users want to be able to find the
nearest colour. For example, searching on #4854D3 would return "Point Break". The search list would then be an ascending list of similar but diverging colours
Normally I would calculate the nearest colour by calculating Euclidean distance for all colours, sorting them, and returning the first one. Is there a way to achieve this natively with Typesense? Could I do it with embeddings, or am I limited to doing some logic at query-time?
Would greatly appreciate any tips. I'm working on an updated design, so if you have any feedback on that search page it is much appreciated!
Cheers,
Elliot