color-interpolator
This is a little package to interpolate between colors.
I developed it to be used together with react-motion
but it is agnostic enough to be used for any case where color interpolation is needed.
Installation
npm install --save color-interpolator
Use cases
I have an example of how to use it in: https://github.com/germtb/react-motion-examples
The idea is the following:
;;;; const SlideColor = { // Since it is not possible to use spring over a color, a parameter is used const defaultStyle = t: 0 ; const endStyle = t: ; return <Motion defaultStyle=defaultStyle style=endStyle> { // Here the parameter is used as an interpolation parameter const color = ; console; return <div style=Object> propschildren </div>; } </Motion> ;}; ReactDOM;