tweening-color-middleware

1.2.0 • Public • Published

Tweening color middleware

Color middleware for tweening.

1.1kb gzipped.

Usage

Currently supports hex, rgb and rgba colors:

import tween from 'tweening';
import colorMiddleware from 'tweening-color-middleware';
 
tween({
  from: '#000',
  to: '#F0F0F0',
  duration: 5000,
  middleware: [ colorMiddleware ],
  next: color => console.log( color ),
});

CommonJS

This is how you get to the good stuff if you're using require.

const TweeningColorMiddleware = require( 'tweening-color-middleware' );
const colorMiddleware = TweeningColorMiddleware.default;

UMD

And if you just want to smash in a Javascript file you're also covered. Drop this in place ...

https://npmcdn.com/tweening-color-middleware@1.2.0/dist/tweening-color-middleware.min.js

Then access it on the TweeningColorMiddleware global variable.

const colorMiddleware = TweeningColorMiddleware.default;

Help make this better

Issues and pull requests gratefully received!

I'm also on twitter @colinmeinke.

Thanks 🌟

License

ISC.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.0
    2
  • 1.1.0
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i tweening-color-middleware

Weekly Downloads

4

Version

1.2.0

License

ISC

Last publish

Collaborators

  • colinmeinke