Traditional color science treats colors as points in a 3D cube (RGB) or cylinder (HSL). Manifold learning takes a different approach: it considers colors as lying on a complex, curved surface — a manifold — embedded in higher-dimensional space. The "true" distance between two colors is measured along this surface, not through the cube.
Geodesic vs. Euclidean Distance
Imagine the surface of the Earth. The straight-line (Euclidean) distance between London and Tokyo goes through the planet, but the meaningful distance follows the curved surface. Similarly, the perceptually meaningful path between two colors may curve through color space rather than cut straight through it. This curved path distance is called a geodesic.
Techniques
- t-SNE — projects high-dimensional data to 2D/3D, preserving local neighborhoods. Useful for visualizing palette clusters.
- UMAP — Uniform Manifold Approximation and Projection. Faster than t-SNE and better at preserving global structure. Increasingly used for large-scale color analysis.
- Isomap — builds a neighborhood graph and computes shortest paths to approximate geodesic distances. Conceptually the closest to "measuring distance along the manifold."
Application in Generative Art
When generating smooth color transitions (gradients), interpolating linearly in RGB or even OKLCH can produce desaturated midpoints. Manifold-aware interpolation follows the curved surface of perceptually valid colors, producing transitions that feel more natural. This is particularly important for generative art that traverses large hue ranges — a gradient from red to blue that stays vivid rather than passing through muddy gray.
