Inspiration
People are paying real money to have their colours figured out. Personal colour analysis is booming, with studios in Seoul charging over $100 a session and now taking a spectrophotometer reading first, your skin's brightness and redness as actual numbers, before the old fabric-draping.
I wanted to do that from a selfie, and go one step further: don't just tell someone their colours, build the actual looks and put them on their face, styled around the outfit they're about to wear.
What it does
Touchstone builds makeup looks from two things it can actually measure about you: your colouring, and the outfit you're about to wear. You take a selfie (or pick a sample face), Perfect Corp's APIs read your skin, and Touchstone turns that into five complete looks rendered on your face.
Core features:
- Measured colour analysis: reads your real skin, lip, hair and eye colour plus your Fitzpatrick type, and shows them back to you as swatches of your own colouring, not a guess
- Five looks on your actual face: chosen from eleven templates and rendered onto your photo, each with a plain-English reason it was picked for you. A look might be three parts or five, pulled from lip colour and liner, eyeshadow and eyeliner, brows, blush, highlighter and concealer, depending on what the look is going for
- A visibility check on every shade: before anything is recommended, it has to clear a measured distance from your own skin and lips, stay in your palette, and stay distinct from the other looks. Shades that fail don't get shown
- Outfit-aware selection: photograph what you're wearing and it shifts which looks you get. A loud dress steps the makeup back; a neutral one lets it go bolder
- The deep-skin proof: a side-by-side of the one rule that makes this work on deep skin, rendered on the face instead of asserted in a caption
- Foundation match: three shades around your measurement, drag-to-wipe against your bare photo
- Named shades, not hex: "vivid brick" is something you can say at a counter; #c14f35 isn't
- No camera needed: three sample faces run the same path a real photo does, so anyone can reach the payoff
How I built it
The pipeline is simple: Perfect Corp measures, my engine decides, Perfect Corp renders. Four APIs plus a colour engine in the middle.
- skin-tone-analysis: reads measured skin, lip, hair and eye colour. Everything downstream is computed against these, since you can't check a shade is visible on someone without knowing their real colour.
- fitzpatrick-scale-analyzer: an independent depth reading that cross-checks the tone measurement and picks which colour register to work in.
- makeup-vto: renders each look on the face, plus the deep-skin comparison.
- sod (background removal): used off-label. It strips a garment photo down so I can pull a colour palette from the pixels, since there's no garment-analysis endpoint.
Camera Kit owns capture end to end, including face-position validation, so I never had to build that screen myself. The engine itself is written in OKLCh: it places each shade against your measured skin lightness, checks it survives as a visible colour, keeps it inside your palette, and keeps the five looks different enough to be a real choice. Those four constraints fight each other, so it's constraint satisfaction, not a threshold.
Challenges I ran into
Getting makeup to show up on deep skin was the hard part, and I got it wrong at first. My instinct was to push a shade that was disappearing into the skin further away until it stood out. But that just kept producing near-black: pushing a colour away from the skin doesn't make it a colour, it makes it dark. The real fix was upstream, in how the shade gets picked in the first place, and after that a look that used to come out almost black came out a vivid raspberry. I only caught it because I made myself render the result on a face instead of trusting the code.
Cost was the other one. I'd guessed a full run at around 5 API units. It was 33-36, most of it spent measuring the face rather than rendering looks, so I made re-renders cheap and moved most of my testing offline.
Accomplishments that I'm proud of
That you don't have to take my word for the deep-skin claim. I've got an offline test suite that checks it against colour profiles spanning Fitzpatrick I to VI, and it runs in about thirty seconds from a fresh clone, no API key needed. What I actually like about it is that it also checks the rule stays completely inactive on the five lighter profiles, so it's not just proving deep skin works, it's proving I didn't just bolt on a special case for it. I also wrote a script that regenerates the comparison table straight from the engine, so the numbers in the README can't drift from what the code actually does.
What I learned
The thing that surprised me most: on deep skin, darkening a shade to make it "deeper" mostly just kills it, because at low lightness there isn't room left for saturated colour. Depth and vividness fight each other there in a way they don't on lighter skin, and that's the whole reason this is hard.
I also learned how the YouCam APIs behave in practice. Rendering is async, so you fire a task and poll for it. Camera Kit brings its own capture screen you can't restyle. And the costs are front-loaded on measurement, which is what pushed the whole architecture toward measuring once and re-rendering cheaply.
What's next for Touchstone
I want to turn this into a real consumer app. The core loop is something people would genuinely use to shop with, so the plan is to polish it into something everyday users can just pick up.
Built With
- perfectcorp-api
- react
Log in or sign up for Devpost to join the conversation.