codepunkt / css-spring

Generate physics based css-keyframe animations for the css-in-js solution of your choice or plain css.
MIT License
313 stars 15 forks source link

Support color interpolation #3

Closed codepunkt closed 7 years ago

codepunkt commented 7 years ago

RGB color interpolation could be done using https://github.com/miguelmota/interpolate-rgb - not too sure about rgba, hsl, hsla, named colors etc...

codepunkt commented 7 years ago

Decided to only to basic rgb hex interpolation. Should support #f00 shorthands and #bada55 default format. Also, doing more color interpolation is questionable because colors are always fixed interval values, such as [0, 255] for rgb components. every value below or above that results from the interpolation from source to target rgb component value has to be brought into that interval, so something like wobbly doesn't really work.