Experimental browser for the Atmosphere
Fascinating design system question today: "We have many one-off hex colors that don't match any design system color tokens. How can we efficiently find the nearest color token?" Turns out with a little RGB color math, you can do exactly that. distance = √((r2 - r1)² + (g2 - g1)² + (b2 - b1)²)
Apr 7, 2025, 10:48 PM
{ "uri": "at://did:plc:3dpbdojqyfmc5smpvw3sln4l/app.bsky.feed.post/3lmb26yv7ts2m", "cid": "bafyreiak7tlnegywpshh27rcdxpyxih6qokltm4tnjuzk5tjjmvn5vimfy", "value": { "text": "Fascinating design system question today: \"We have many one-off hex colors that don't match any design system color tokens. How can we efficiently find the nearest color token?\"\n\nTurns out with a little RGB color math, you can do exactly that.\n\ndistance = √((r2 - r1)² + (g2 - g1)² + (b2 - b1)²)", "$type": "app.bsky.feed.post", "langs": [ "en" ], "createdAt": "2025-04-07T22:48:46.388Z" } }