frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: Simple algorithm and color space to generate diverse skin tones

https://toneyalexander.github.io/inclusive-color-space/
92•automatoney•1h ago
Hello HN!

I found that picking out plausible but diverse skin tones for my digital art and game development projects was kind of difficult, and I got curious about if there was a way to define a color space that made it easy.

I've built a color picker and procedural generation algorithm based on the space as well as a bunch of other fun js features and demos throughout the page that use the equations. If you find it interesting, I have lots of explanations of how I built it and what properties the space has.

The methodology might be a bit shaky, but hopefully the result is as helpful for others as I have found it! There's lots of room for improvements (see the Future Work section), but I'm really happy with how it turned out.

Comments

m_w_•48m ago
This is super cool! I have always loved projects that try to categorize color space. Usually my work has gone in the other direction - isGray, isCloseToWhite, isPastel - but it's the same insofar as it's defining shapes like your matplot visual.

Wish I had this on hand like this three or four years ago when I was working on VR avatar software - we had hard-coded skin tone options at the time - would have been a cool addition!

automatoney•41m ago
In sharing this around I've found more people than I thought who've done things to semantically chop up the color space - definitely a more interesting area than I first thought of when working on my narrow use case. Feels like it'd be fun to play with something that has a whole bunch of different regions of color space labeled - like "here's where IsPastel overlaps with IsGreen".

But absolutely the hope is that this is a tool that stays accessible to people for whatever they're building and everyone can slow down on reinventing the wheel here for every character creator/digital art application.

moralestapia•37m ago
Interesting.

It might be a bit biased though, as there's much more variation on fairer skin tones than on dark ones (there's only one that looks like the colloquial "black").

This contradicts all research and social media from the past decade.

Tossrock•32m ago
...Did you read the article, or use the picker? It's a continuous (up to the limits of RGB quantization) space which includes thousands upon thousands of shades of black. The selected tones at the top of the article are random and change continuously.
andai•36m ago
Nice. Most of these colors look right to me, but I'm also seeing green, blue and purple? If you're curating colors from the space manually then it's not a problem.

"Only realistic colors" would be a different problem. And I'm not sure if there's a way to solve that problem without excluding some real colors too.

(Maybe if the colour selector was a different shape? I don't know much about color spaces.)

automatoney•30m ago
Yes absolutely right on - I mention much deeper in the page that in a picker UI you can use a bigger range, but that in a generation context you might want to be a bit more selective. I go into it a bit more when I explain what R^2 is.

"not sure if there's a way to solve that problem without excluding some real colors too" - 100% right on that too. A big part of this work was to define a way to tweak/improve the equations in order to approach a solution to these issues - part of my hope in sharing is to get more eyes and brains thinking about this and proposing improvements!

compass_copium•20m ago
I would have "show sphere" on by default--this kind of threw me at first, too.

This is a really nice project. Great work and a great write-up. Thanks for sharing.

wongarsu•27m ago
If you drag the bottom slider all the way to the right you only have plausible skin tones. Drag it all the way to the right and you can match skin tones for orcs, Na'vi and djinn
richiebful1•22m ago
Reducing the R^2 value to ~1.5 excludes skin colors that are extremely blue, green and purple. That seems to be a happy medium between including real outliers and excluding colors like green.
Abh1Works•35m ago
Cool work!
383toast•32m ago
Seems to underrepresent pale skin tone variety
LocalH•9m ago
Turn off your dark mode reader extension
vermarish•31m ago
This is beautiful work! First, I thought this would involve using PCA to go from 3D to 2D, which would result in an easier selector to use, but at the expense of representing every person.

Then, I thought this would stop at using the U-space vectors (the ones that form the basis of the PCA image) and their corresponding ellipse to form our color space, but no, the function fitting is a very slick idea, even if it was executed by hand.

Lastly, I love the presentation of sampling from different r values. Whether you sample from a fixed r value or a range of r values, I bet this has great applications in game design or animation.

I still don't quite get the manual data labeling process at the beginning? It seems like it would encode some bias, but the consistency of the first point cloud and the results certainly speak for themselves.

automatoney•26m ago
Thank you! I call out the manual labeling bias and also that a future work improvement would be to be scientific about that labeling process (multiple labelers, expert labelers), and then to feed that into the equation generation steps. Part of where the "good enough" naming comes from - I was hoping that using my art brain and keeping a bunch of reference images in mind (shout out to the Humanae project) would maybe offset the bias a bit. But 100% right on the bias being there.
dr_scully•15m ago
If you look at my doctoral thesis, in fact skin colour can be parametrised using melanin and haemoglobin concentration; which it means it is indeed (roughly) two dimensional. This allows you to invert the colour of a pixel and identify someone’s chromophore concentration. This is based on previous work of others cited in the thesis.

https://discovery.ucl.ac.uk/id/eprint/10093345/

GolDDranks•
RIMR•30m ago
For anyone confused, turn off your dark mode extension. :)
automatoney•23m ago
Oh wow, didn't even think of how that sort of thing might affect the page.
stephantul•28m ago
Love it. I especially thought the introspective “aside” section on related resources was great, and I wish more people would show this kind of reflection.
automatoney•24m ago
Thanks! I hope to send lots of love those ways, they're basically all things that I found outside of this work that I liked enough to remember (I think Humanae was the one that I found while doing this).
hluska•22m ago
This is excellent work! You’ve got a 49 year old and a 10 year old equally into it. That’s impressive - nice work.
ptsneves•12m ago
On the movie Dolemite by Eddy Murphy, they go over the fact that black people absorb light and white people reflect, and how that changes the motion picture shooting process totally. Also how one size does not fit all. Cool project! I am not much into the humanities part of the project. For me this is as natural as having a localization framework, just in this case for skin tones.
PullJosh•7m ago
I love this! Such a beautiful use of some real nerdy math to benefit humans in a way non-nerds would appreciate.
rrradical•4m ago
Very neat project. Could I use this code to generate skin tones in my own project? Or more meant to just be educational/inspirational? I guess I'm wondering if you've considered adding a license.
9m ago
I've heard that the so-called "yellowish" skin color that non-tanned East Asians tend to have, is due to relative abundance of subcutaneous fat. If that's true, is that captured by the haemoglobin dimension or is it a yet another degree of freedom?

Show HN: Simple algorithm and color space to generate diverse skin tones

https://toneyalexander.github.io/inclusive-color-space/
100•automatoney•1h ago•24 comments

Show HN: Ex-Deloitte auditor open-sourced the whole SOC 2 method for your AI

https://github.com/Chiaro-HQ/methodology
5•yylyyl•8m ago•0 comments

Show HN: Fine-tune an 8B model on a 4 GB laptop GPU

https://github.com/MakazhanAlpamys/Soup
80•MakazhanAlpamys•5h ago•10 comments

Show HN: FastStrapy – A create-next-app-inspired CLI for FastAPI

https://github.com/AnoopGeorge418/faststrapy
2•anoopgeorge418•10m ago•0 comments

Show HN: Run an 80B Qwen in 4.3 GB of RAM on a Mac, and a 35B on an iPhone

https://github.com/leonickson1/Swiftlet
272•leonickson•23h ago•123 comments

Show HN: Jido Assembly; Slack Clone in Pure Elixir with Integrated Agents

https://jido.run/blog/jido-assembly-slack-clone
3•mikehostetler•39m ago•0 comments

Show HN: Adapt, Automatically Turns Files into REST APIs, Web UI, and MCP

https://github.com/mcindi/adapt
2•ilovetux•46m ago•0 comments

Show HN: Korvo – Local-first AI workspace that traces answers to the source

https://www.korvo.xyz/
2•akshay_bhardwaj•1h ago•0 comments

Show HN: OpenEdit – Your coding agent can now edit videos

https://github.com/veedstudio/open-edit
3•sabbakeynejad•1h ago•1 comments

Show HN: Simple self-hosted LLM assistant with user-steered compounding context

https://github.com/kol3x/pawmc
2•kol3x•1h ago•0 comments

Show HN: Listen to audiobooks like you read, at your own pace

https://listendock.com/sentence-mode
2•janpmz•3h ago•0 comments

Show HN: The invisible WiFi man. How one man built global "Brand" WiFi in 2009

https://calumbugattimacdonald.com
2•BugattiMacD•3h ago•0 comments

Show HN: ssh ssh.place

https://ssh.place
180•jeninh•1d ago•111 comments

Show HN: Nightcrawler – A local AI pentesting agent running on a smartphone

https://github.com/garagehq/nightcrawler/
113•NickySlicks•1d ago•32 comments

Show HN: Bourdon – one shared memory file for Claude Code, Codex, Cursor

https://bourdon.ai
3•RADLAB•5h ago•0 comments

Show HN: Salary Ticker – a macOS menu bar app that ticks up your pay

https://steveharrison.dev/salaryticker/
5•steveharrison•5h ago•0 comments

Show HN: A new type of search engine

https://galefox.com/
3•wesammikhail•5h ago•4 comments

Show HN: A speed reading test you can fail

https://www.readkinetic.com/speed-test
2•SamuraiLion•5h ago•0 comments

Show HN: cctap – see and reach the Claude Code session that needs you

https://github.com/chipmates/cctap
2•micstradev•5h ago•0 comments

Show HN: Turn one plain-English question into a decision-ready market

https://researchmaster.ai/en
2•not_wowinter13•5h ago•0 comments

Show HN: Çetele – Open-source notepad calculator

https://cetele.online/
5•nurulmac11•5h ago•0 comments

Show HN: Listnr – macOS meeting transcription that never mixes mic and speakers

https://github.com/rokib16x/listnr
6•rokib16x•5h ago•0 comments

Show HN: I built a tool to find your first users before they find you

https://agenmatic.ai/
3•Nancylily•5h ago•3 comments

Show HN: Product analytics (and evals) for agent sessions on your MCP

https://armature.tech/
41•screm•1d ago•2 comments

Show HN: A Handwritten Blogging Platform

https://handwritten.blog/
183•emilesilvis•4d ago•86 comments

Show HN: Knuth–Plass algorithm for short-form video

https://viki.wiki/assets/waffle/wafflemaker-slop2.html
2•richardprince4•5h ago•1 comments

Show HN: PolyTrip – crowd-funded group trip planning with AI

https://polytrip.co/
3•Maorperry1•6h ago•2 comments

Show HN: Paranoia – Get a cold, adversarial review of your code

https://github.com/subvertnormality/paranoia-local
3•Grahf•6h ago•2 comments

Show HN: Servitor – simplest way to run local dev containers

https://sndsabin.github.io/servitor/
4•havu12•6h ago•0 comments

Show HN: Clawx – A package manager where packages are agent tasks

https://github.com/debarshibasak/clawx
2•debarshri•6h ago•0 comments