I’d like to map points in a RGB color cube to a one-dimensional list in Python, in a way that makes the list of colors look nice and continuous.
I believe using a 3D Hilbert space-filling curve would be a good way to do this, but I’ve searched and haven’t found very helpful resources for this problem. Wikipedia in particular only provides example code for generating 2D curves.
This paper seems to have quite a discussion:
An inventory of three-dimensional Hilbert space-filling curves.
Quoting from the abstract: