graypegg / chromatism

:rainbow: A simple set of utility functions for colours.
1.78k stars 37 forks source link

Added TypeScript definitions for library #1

Closed bdoss closed 7 years ago

graypegg commented 7 years ago

Wow, thanks so much! Will merge this in and I'll add a note to the README about adding to this definitions file when contributing

One small nit-picky thing before that, the colour mode type for CSS_RGB + CSS_HSL might be better as CSSRGB and CSSHSL to better sync up with the colour mode labels used in conversions, keeps consistency with CIELAB as well.

bdoss commented 7 years ago

Funny you mention that about CSS_RGB and CSS_HSL prop naming, I was really on the fence about it and looked at it both ways trying to determine which was the better approach. :)

I'll update the pull request to CSSRGB and CSSHSL.

graypegg commented 7 years ago

Thanks so much again! :) Will make this lib way easier to use with typescript, controlling the mess of colour objects now

bdoss commented 7 years ago

Glad I could help! It's a great little library and very well documented! The definitions practically wrote themselves. :)