Skip to main content
BVDART Logo

Manifold learning and color neighborhoods

Manifold learning studies lower-dimensional structure in high-dimensional data. In color analysis, it asks whether relationships between sampled colors can be represented more usefully in fewer coordinates.

Compare nearest neighbors across a fold and along a path.

Folded path: nearby in the plane versus nearby along the path- - Plane · ━ Path
Same samples, ordered along the path
0 → 69
Nearest in the plane: 42, 44, 18, 17, 68Nearest along the sample order: 42, 44, 41, 45, 403 neighbors disagree

A shortcut across a fold can be short in the plane but long along the curve. Colors label sample order; they are not coordinates of a fitted color manifold. This 2D analogy compares local relationships and an already-known ordering. It does not run LLE, UMAP or t-SNE.

The path folds around a fixed sample, then the sample travels along it. Plane neighbors can jump across folds. Use any control to take over.

What to try
  1. Change Folds / turns and select a sample near an adjacent turn.
  2. Vary Neighbor count and compare the graph connections with the ordered sample strip.
Open in the Lab ↗

What to look for: Nearby points in the plane can be far apart in sample order. This explicit 2D analogy illustrates a neighborhood choice; it does not fit a learned embedding.

How it works

A straight-line distance can connect points that lie on nearby folds of a curved structure even though they are far apart along that structure. Neighborhood-based methods attempt to preserve selected local relationships when constructing an embedding.

The spiral below is a deliberately small geometric analogy. Amber points are the closest in the displayed plane; mint points are neighbors along the sampled curve. Changing the folds shows how these two notions of neighborhood can disagree.

Use it in the Lab

This is background for palette organization and color-space exploration. The Lab exposes color matching and palette quantization; it does not currently fit a learned manifold.

Limits & distinctions

The experiment illustrates a neighborhood problem. It does not run LLE, UMAP or t-SNE, and a two-dimensional picture of colors does not by itself establish a perceptual model.

Further reading

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.

Key Takeaway

Manifold learning represents the cutting edge of color distance theory. While Euclidean distance in OKLAB is sufficient for most practical tasks, manifold-based approaches unlock smoother gradients and more perceptually honest clustering for advanced generative applications.

Related Lab categories

Sources & references

Guide updated