chromaticity-color-utilities
Version:
Color utilities for Node.js
140 lines (139 loc) • 4.86 kB
TypeScript
import * as Colors from './Colors';
declare class Blend {
/**
* Blend of one RGB color onto another
*
* @param {Colors.rgb} rgb1
* @param {Colors.rgb} rgb2
* @param {number} amount amount to blend, 0-1
* @return {Colors.rgb}
*/
static rgbBlendMode(rgb1: Colors.rgb, rgb2: Colors.rgb, amount: number | undefined, method: string): Colors.rgb;
/**
* Blend one RGB color with another
*
* @param {Colors.rgb} rgb1
* @param {Colors.rgb} rgb2
* @param {number} amount amount to blend, 0-1
* @return {Colors.rgb}
*/
static rgbBlend(rgb1: Colors.rgb, rgb2: Colors.rgb, amount?: number): Colors.rgb;
/**
* Blend the hue of one HSV color with another
*
* @param {Colors.hsv} hsv1
* @param {Colors.hsv} hsv2
* @param {number} amount amount to blend (0-1)
* @return {Colors.hsv}
*/
static hueBlend(hsv1: Colors.hsv, hsv2: Colors.hsv, amount?: number): Colors.hsv;
/**
* Blend one HSV color with another
*
* @param {Colors.hsv} hsv1
* @param {Colors.hsv} hsv2
* @param {number} amount amount to blend (0-1)
* @return {Colors.hsv}
*/
static hsvBlend(hsv1: Colors.hsv, hsv2: Colors.hsv, amount?: number): Colors.hsv;
/**
* Blend the value of one HSV color with another
*
* @param {Colors.hsv} hsv1
* @param {Colors.hsv} hsv2
* @param {number} amount amount to blend (0-1)
* @return {Colors.hsv}
*/
static valueBlend(hsv1: Colors.hsv, hsv2: Colors.hsv, amount?: number): Colors.hsv;
/**
* Blend one HSL color with another
*
* @param {Colors.hsl} hsl1
* @param {Colors.hsl} hsl2
* @param {number} amount amount to blend (0-1)
* @return {Colors.hsl}
*/
static hslBlend(hsl1: Colors.hsl, hsl2: Colors.hsl, amount?: number): Colors.hsl;
/**
* Blend the lightness of one HSV color with another
*
* @param {Colors.hsl} hsl1
* @param {Colors.hsl} hsl2
* @param {number} amount amount to blend (0-1)
* @return {Colors.hsl}
*/
static lightnessBlend(hsl1: Colors.hsl, hsl2: Colors.hsl, amount?: number): Colors.hsl;
/**
* Blend one HSI color with another
*
* @param {Colors.hsi} hsi1
* @param {Colors.hsi} hsi2
* @param {number} amount amount to blend (0-1)
* @return {Colors.hsi}
*/
static hsiBlend(hsi1: Colors.hsi, hsi2: Colors.hsi, amount?: number): Colors.hsi;
/**
* Blend the intensity of one HSI color with another
*
* @param {Colors.hsi} hsi1
* @param {Colors.hsi} hsi2
* @param {number} amount amount to blend (0-1)
* @return {Colors.hsi}
*/
static intensityBlend(hsi1: Colors.hsi, hsi2: Colors.hsi, amount?: number): Colors.hsi;
/**
* Blend one HSP color with another
*
* @param {Colors.hsp} hsp1
* @param {Colors.hsp} hsp2
* @param {number} amount amount to blend (0-1)
* @return {Colors.hsp}
*/
static hspBlend(hsp1: Colors.hsp, hsp2: Colors.hsp, amount?: number): Colors.hsp;
/**
* Blend the perceived brightness of one HSP color with another
*
* @param {Colors.hsp} hsp1
* @param {Colors.hsp} hsp2
* @param {number} amount amount to blend (0-1)
* @return {Colors.hsp}
*/
static perceivedBrightnessBlend(hsp1: Colors.hsp, hsp2: Colors.hsp, amount?: number): Colors.hsp;
/**
* Blend one CMYK color with another
*
* @param {Colors.cmyk} cmyk1
* @param {Colors.cmyk} cmyk2
* @param {number} amount amount to blend (0-1)
* @return {Colors.cmyk}
*/
static cmykBlend(cmyk1: Colors.cmyk, cmyk2: Colors.cmyk, amount?: number): Colors.cmyk;
/**
* Blend one YIQ color with another
*
* @param {Colors.yiq} c1
* @param {Colors.yiq} c2
* @param {number} amount amount to blend (0-1)
* @return {Colors.yiq}
*/
static yiqBlend(c1: Colors.yiq, c2: Colors.yiq, amount?: number): Colors.yiq;
/**
* Blend one Lab color with another
*
* @param {Colors.lab} c1
* @param {Colors.lab} c2
* @param {number} amount amount to blend (0-1)
* @return {Colors.lab}
*/
static labBlend(c1: Colors.lab, c2: Colors.lab, amount?: number): Colors.lab;
/**
* Blend one Luv color with another
*
* @param {Colors.luv} c1
* @param {Colors.luv} c2
* @param {number} amount amount to blend (0-1)
* @return {Colors.luv}
*/
static luvBlend(c1: Colors.luv, c2: Colors.luv, amount?: number): Colors.luv;
}
export default Blend;