Qix- / color-convert

Plain color conversion functions in JavaScript
MIT License
746 stars 96 forks source link

Add string conversions #62

Closed beasteers closed 5 years ago

beasteers commented 5 years ago

Conversions should be able to handle strings as input and output. It looks like it would be pretty straight forward to connect it with your package color-string, at least for the supported colors.

convert.hsl.hex('hsl(256,100,17)') -> '0C002C'
convert.hsl.hex.str('hsl(256,100,17)') -> '#0C002C'
convert.hsl.hex.str([256, 100, 17]) -> '#0C002C'
convert.hsl.rgb('hsl(256,100,17)') -> [12, 0, 44]
convert.hsl.rgb.str('hsl(256,100,17)') -> 'rgb(12, 0, 44)'
Qix- commented 5 years ago

Sorry, not happening. That's the scope of color-string.