tinygradient
Advanced tools
Comparing version 0.4.1 to 0.4.2
{ | ||
"name": "tinygradient", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "Damien \"Mistic\" Sorel", |
TinyGradient | ||
============ | ||
[![Bower version](https://img.shields.io/bower/v/tinygradient.svg?style=flat-square)](https://github.com/mistic100/tinygradient) | ||
[![NPM version](https://img.shields.io/npm/v/tinygradient.svg?style=flat-square)](https://www.npmjs.com/package/tinygradient) | ||
[![](https://data.jsdelivr.com/v1/package/npm/tinygradient/badge)](https://www.jsdelivr.com/package/npm/tinygradient) | ||
## JavaScript gradients generator | ||
Easily generate color gradients with unlimited number of color stops and steps. | ||
Easily generate color gradients with an unlimited number of color stops and steps. | ||
@@ -17,3 +17,3 @@ Built on top of [TinyColor](https://github.com/bgrins/TinyColor). | ||
The gradient can be generate using RGB or HSV interpolation. HSV usually produces brighter colors. | ||
The gradient can be generated using RGB or HSV interpolation. HSV usually produces brighter colors. | ||
@@ -95,3 +95,3 @@ ### Initialize gradient | ||
The `css` method will output a valid W3C string (without vendors prefix) to use with `background-image` css property. | ||
The `css` method will output a valid W3C string (without vendors prefix) to use with `background-image` CSS property. | ||
@@ -106,3 +106,3 @@ ```javascript | ||
### Get color at specific position | ||
### Get color at a specific position | ||
@@ -109,0 +109,0 @@ Returns a single TinyColor object from a defined position in the gradient (from 0 to 1). |
@@ -15,3 +15,9 @@ /*! | ||
type StopInput = { | ||
color: tinycolor.ColorInput | ||
pos: number | ||
} | ||
interface Instance { | ||
stops: StopInput[] | ||
@@ -72,6 +78,6 @@ /** | ||
*/ | ||
new (stops: tinycolor.ColorInput[]): Instance; | ||
new (...stops: tinycolor.ColorInput[]): Instance; | ||
(stops: tinycolor.ColorInput[]): Instance; | ||
(...stops: tinycolor.ColorInput[]): Instance; | ||
new (stops: StopInput[] | tinycolor.ColorInput[]): Instance; | ||
new (...stops: StopInput[] | tinycolor.ColorInput[]): Instance; | ||
(stops: StopInput[] | tinycolor.ColorInput[]): Instance; | ||
(...stops: StopInput[] | tinycolor.ColorInput[]): Instance; | ||
@@ -84,3 +90,3 @@ /** | ||
*/ | ||
rgb(stops: tinycolor.ColorInput[], steps: number): tinycolor.Instance[]; | ||
rgb(stops: StopInput[] | tinycolor.ColorInput[], steps: number): tinycolor.Instance[]; | ||
@@ -98,3 +104,3 @@ /** | ||
*/ | ||
hsv(stops: tinycolor.ColorInput[], steps: number, mode: ArcMode): tinycolor.Instance[]; | ||
hsv(stops: StopInput[] | tinycolor.ColorInput[], steps: number, mode: ArcMode): tinycolor.Instance[]; | ||
@@ -108,3 +114,3 @@ /** | ||
*/ | ||
css(stops: tinycolor.ColorInput[], mode?: CssMode, direction?: string): string; | ||
css(stops: StopInput[] | tinycolor.ColorInput[], mode?: CssMode, direction?: string): string; | ||
@@ -117,3 +123,3 @@ /** | ||
*/ | ||
rgbAt(stops: tinycolor.ColorInput[], pos: number): tinycolor.Instance; | ||
rgbAt(stops: StopInput[] | tinycolor.ColorInput[], pos: number): tinycolor.Instance; | ||
@@ -126,3 +132,3 @@ /** | ||
*/ | ||
hsvAt(stops: tinycolor.ColorInput[], pos: number): tinycolor.Instance; | ||
hsvAt(stops: StopInput[] | tinycolor.ColorInput[], pos: number): tinycolor.Instance; | ||
} | ||
@@ -129,0 +135,0 @@ } |
/*! | ||
* TinyGradient 0.4.1 | ||
* TinyGradient 0.4.2 | ||
* Copyright 2014-2018 Damien "Mistic" Sorel (http://www.strangeplanet.fr) | ||
@@ -4,0 +4,0 @@ * Licensed under MIT (http://opensource.org/licenses/MIT) |
/*! | ||
* TinyGradient 0.4.1 | ||
* TinyGradient 0.4.2 | ||
* Copyright 2014-2018 Damien "Mistic" Sorel (http://www.strangeplanet.fr) | ||
@@ -4,0 +4,0 @@ * Licensed under MIT (http://opensource.org/licenses/MIT) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
664942
28
9836