I need to represent a series of elements through time. For designing purposes each of them should have a color to make it simplier to identify each one at a glance. The point is that color each elemnt would make no sense if the difference in color between them is not appreciable by humans.
The only fixed attribute the elements have is their ID. This ID is supossed to differ by one from one element to another, but this is not certain.
What I look for is a hash function that based on a numeric ID returns an HEX color (web format e.g. #f62035) that differs a lot with the previous ID and the next ID. Also, the HEX color must not be too dark since the background where the elements are displayed is black.
Example:
Element ID: 12
Element ID: 13
hash(12) = #f46600
hash(13) = #5aa9aa