I have a "colors" table in my database.
The user enters a color trough the user interface, and the backend searches for the most similar looking color existing in the colors table, calculating the distance of the colors in the HCL space.
I will implement a caching algorithm, which should store the distance between previously calculated color distances, to avoid repeated math operations.
What is the best table layout for such purpose ?