@types/color-string
TypeScript definitions for color-string
Last updated 4 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/color-string 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/color-string

Summary

This package contains type definitions for color-string (https://github.com/qix-/color-string#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/color-string.

index.d.ts

// Type definitions for color-string 1.5
// Project: https://github.com/qix-/color-string#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
//                 Dan Marshall <https://github.com/danmarshall>
//                 Eric NICOLAS (ccjmne) <https://github.com/ccjmne>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export type Color = [number, number, number, number];

export interface ColorDescriptor {
    model: 'rgb' | 'hsl' | 'hwb';
    value: Color;
}

export function get(colorString: string): ColorDescriptor | null;

export namespace get {
    function hsl<TColorStr extends string | null>(colorString: TColorStr): TColorStr extends string ? Color : null;
    function hwb<TColorStr extends string | null>(colorString: TColorStr): TColorStr extends string ? Color : null;
    function rgb<TColorStr extends string | null>(colorString: TColorStr): TColorStr extends string ? Color : null;
}

export namespace to {
    function hex(...args: Array<number | number[]>): string;
    function rgb(...args: Array<number | number[]>): string;
    namespace rgb {
        function percent(...args: Array<number | number[]>): string;
    }
    function keyword(...args: Array<number | number[]>): string;
    function hsl(...args: Array<number | number[]>): string;
    function hwb(...args: Array<number | number[]>): string;
}

Additional Details

  • Last updated: Tue, 30 Nov 2021 23:01:03 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by BendingBender, Dan Marshall, and Eric NICOLAS (ccjmne).

Current Tags

  • 1.5.2                                ...           latest (4 years ago)
  • 1.5.0                                ...           ts2.0 (9 years ago)
  • 1.5.0                                ...           ts2.1 (9 years ago)
  • 1.5.0                                ...           ts2.2 (9 years ago)
  • 1.5.0                                ...           ts2.3 (9 years ago)
  • 1.5.0                                ...           ts2.4 (9 years ago)
  • 1.5.0                                ...           ts2.5 (9 years ago)
  • 1.5.0                                ...           ts2.6 (9 years ago)
  • 1.5.0                                ...           ts2.7 (9 years ago)
  • 1.5.0                                ...           ts2.8 (9 years ago)
  • 1.5.0                                ...           ts2.9 (9 years ago)
  • 1.5.0                                ...           ts3.0 (9 years ago)
  • 1.5.0                                ...           ts3.1 (9 years ago)
  • 1.5.0                                ...           ts3.2 (9 years ago)
  • 1.5.0                                ...           ts3.3 (9 years ago)
  • 1.5.0                                ...           ts3.4 (9 years ago)
  • 1.5.0                                ...           ts3.5 (9 years ago)
  • 1.5.0                                ...           ts3.6 (9 years ago)
  • 1.5.0                                ...           ts3.7 (9 years ago)
  • 1.5.2                                ...           ts3.8 (4 years ago)
  • 1.5.2                                ...           ts3.9 (4 years ago)
  • 1.5.2                                ...           ts4.0 (4 years ago)
  • 1.5.2                                ...           ts4.1 (4 years ago)
  • 1.5.2                                ...           ts4.2 (4 years ago)
  • 1.5.2                                ...           ts4.3 (4 years ago)
  • 1.5.2                                ...           ts4.4 (4 years ago)
  • 1.5.2                                ...           ts4.5 (4 years ago)
  • 1.5.2                                ...           ts4.6 (4 years ago)
  • 1.5.2                                ...           ts4.7 (4 years ago)
  • 1.5.2                                ...           ts4.8 (4 years ago)
  • 1.5.2                                ...           ts4.9 (4 years ago)

3 Versions

  • 1.5.2                                ...           4 years ago
  • 1.5.1                                ...           4 years ago
  • 1.5.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org | Home |