webinista / colortheory

Decided to build a thing on a whim. May not finish.
http://colors.webinista.com/
1 stars 0 forks source link

Bug in rgb percentage parsing leads to incorrect conversions #91

Closed webinista closed 6 years ago

webinista commented 7 years ago

rgb(100%, 100%, 100%) should convert to white / #fff / hsl(0, 0%, 100%). Instead it converts to rgb(100, 100, 100) or #646464 which is gray, not white.

Pretty sure it has to do with a parseInt value that shouldn't parseInt until we know whether a % character is present in the string.

webinista commented 7 years ago

Half fixed it. Need to account for: