Show HN: Simple algorithm and color space to generate diverse skin tones(toneyalexander.github.io)
556 points by automatoney 21 hours ago | 95 comments
tl;dr: The author built a custom color space (TUV) for representing diverse skin tones by manually labeling RGB colors, applying principal component analysis to align the data along meaningful axes, then hand-fitting spherical equations in Desmos to map the resulting shape. The three PCA-derived axes conveniently correspond to deep/fair, flushed/ochre, and cool/warm, and a single radius parameter (R²) lets you tune variation for pickers or procedural generation. Includes Python/JS sample code, an interactive picker, and candid acknowledgment of the unscientific "guess and check" methodology.
HN Discussion:
  • Praises the elegance and creativity of the function-fitting and sampling approach
  • ~Notes missing references to prior art like Pantone Skin Tones or existing color research
  • Shares corroborating work using similar data in other color spaces like Oklab
  • ~Points out the model doesn't fully cover certain populations like indigenous Australians or Masai
  • Criticizes the omission of lighting as a critical factor in perceived skin tone