mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-11-29 01:31:45 +00:00
[chroma-js] fix valid interpolation modes
Not all `ColorSpaces` are valid for interpolation, so i created the `InterpolationMode` type, which has valid modes for interpolating between.
This commit is contained in:
Vendored
+3
-1
@@ -21,6 +21,8 @@ declare namespace chroma {
|
||||
gl: [number, number, number, number];
|
||||
}
|
||||
|
||||
type InterpolationMode = "rgb" | "hsl" | "hsv" | "hsi" | "lab" | "lch" | "hcl"
|
||||
|
||||
interface ChromaStatic {
|
||||
/**
|
||||
* Creates a color from a string representation (as supported in CSS).
|
||||
@@ -311,7 +313,7 @@ declare namespace chroma {
|
||||
|
||||
domain(d?: number[], n?: number, mode?: string): this;
|
||||
|
||||
mode(mode: keyof ColorSpaces): this;
|
||||
mode(mode: InterpolationMode): this;
|
||||
|
||||
gamma(g: number): this;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user