5 ms·
This is what Pokémon Showdown does. https://github.com/Zarel/Pokemon-Showdown-Client/blob/434322fecce4deeec9533c4023f0273101055a80/js/battledata.js#L65-L108 ht
by Zarel 10y ago
This is what Pokémon Showdown does.
https://github.com/Zarel/Pokemon-Showdown-Client/blob/434322fecce4deeec9533c4023f0273101055a80/js/battledata.js#L65-L108 https://github.com/Zarel/Pokemon-Showdown-Client/blob/434322...
A naive HSL implementation will lead to very light yellows/cyans and very dark blues. PS corrects for this by manually darkening yellows/cyans and lightening blues.
A better solution might be to use a color model based on perceived luminance, like one discussed here: https://news.ycombinator.com/item?id=11437794 https://news.ycombinator.com/item?id=11437794