1.0.0 • Published 11 months ago

@gladknee/gradient v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

How To Use

type RGB = [number, number, number]

function gradient(color1: RGB, color2: RGB, length: number)

gradient([255, 0, 0], [0, 0, 255], 10)

/* => [
  [255, 0, 0],
  [227, 0, 28],
  [198, 0, 57],
  [170, 0, 85],
  [142, 0, 113],
  [113, 0, 142],
  [85, 0, 170],
  [57, 0, 198],
  [28, 0, 227],
  [0, 0, 255],
]
*/
1.0.0

11 months ago