3.0.1 • Published 2 years ago

interpolated-colors v3.0.1

Weekly downloads
12
License
MIT
Repository
github
Last release
2 years ago

InterpolatedColors

A tool to create dynamic colors by interpolating multiple colors

Gist

import InterpolatedColor from 'interpolated-colors';

const gradient = InterpolatedColor([
  [0, 'red'],
  [30, 'blue'],
  [100, 'green'],
]);

console.log(gradient(0)); // #FF0000 => red
console.log(gradient(30)); // #0000FF => blue
console.log(gradient(100)); // #008000 => green
console.log(gradient(55)); // #00A0D4 => between blue and green
console.log(gradient(55.5)); // #00A2D3 => a bit more geen
3.0.1

2 years ago

3.0.0

3 years ago

2.0.1

4 years ago

2.0.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

1.0.0-alpha.0

6 years ago