UNPKG

ts-useful

Version:

Functions for animation, color transitions, ecliptic, bezier, decasteljau, curves, three dimensional curves, smooth scrolling, random range, randomItem, mobius index, vectors, physics vectors, and easing.

26 lines (25 loc) 859 B
import { vector3 } from './types/vector3'; export declare class ColorPercent extends Array { private static regexArray; private static getRgb; static colorDecToHex: (r: number, g: number, b: number) => string; /** * * @param colorList string[]: ['#ff0000', '#0000FF'] * @param percent number: .03 * @returns hex color. */ static getColor: (colorList: string[], percent: number) => string; /** * * @param t number (float) * @param a vector3 * @param b vector3 * @param c vector3 * @param d vector3 * @returns Hex string */ static makePalette: (t: number, a: vector3, b: vector3, c: vector3, d: vector3) => string; static lighen: (color: string, percent: number) => string; static darken: (color: string, percent: number) => string; }