Back
A Developer Built a 'Good Enough' Color Space for Skin Tones
SiTech Team3 წთ. საკითხავი

A Developer Built a 'Good Enough' Color Space for Skin Tones

An open project defines a three-axis color space for plausible skin tones, built from manually labelled RGB samples, principal component analysis and hand-fitted equations.

A developer, known on GitHub as ToneyAlexander, has published a color space intended to represent a wide range of skin tones. Described on a page titled What Colors Are We?, the project aims to make it easier to build inclusive color tools for contexts such as character creators and digital art, and ships with a JavaScript picker and a Python sample for procedural generation.

Why fixed palettes fall short

The author's starting point is that a handful of preset colors never covers real diversity. As the page puts it, emoji offer five shades (or cartoon yellow), a makeup brand might offer fifty, and a character creator may simply point users at the full 16,777,216-color RGB space. The work tries to land between several and several million: a compact set of equations that defines the region of RGB corresponding to plausible, simplified skin tones.

How the space was built

The method is deliberately pragmatic and, as the author admits, unscientific. It began with a tedious manual step: labelling color samples in RGB as plausible or not, using a small web tool that displayed each color on a drawn face. The labelled data formed a banana-shaped cloud in RGB space. A principal component analysis with three components rotated and rescaled that cloud into a workable shape, and the author then hand-fitted equations in Desmos 3D that map a sphere in the new TUV space onto the data — guess-and-check fitting rather than regression. Inverting the relationships yields the conversion back to RGB.

What the three axes mean

The resulting picker exposes three independent values. The T axis moves between deep and fair, U between flushed and ochre, and V between cool and warm. What surprised the author is that these meanings emerged from the analysis itself: the directions were not chosen in advance, and he only discovered what each control adjusts after the picker was built — a demonstration of how PCA rotates data to maximise the meaning of each axis. He notes the space resembles HSL or HSV at a glance, but the axes do not map cleanly onto value, hue and saturation.

Limitations and what comes next

The author is explicit that the result is a useful starting point rather than an authority. Skin is never a single color: blood flow, melanin concentration, light scattering, freckles, vitiligo, hyperpigmentation and scarring all vary it, and conditions such as argyria or high bilirubin push people well outside any plausible range. Colors also render differently across screens and lighting, and the labelling was done by one subjective person, not a research team. Planned improvements include gathering labels from more people — ideally experts — modelling skin conditions as modifications of base tones, and replacing the eyeballed equations with symbolic regression trained on better data. The code is published on GitHub, and the author asks for feedback through the repository's issue tracker.

SSiTech

SiTech — AI-powered web development

We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.