UNPKG

952 BTypeScriptView Raw
1import { CSSStyleValue, CSSStyleValueType } from './CSSStyleValue';
2/**
3 * @see https://drafts.css-houdini.org/css-typed-om-1/#dom-csscolorvalue-colorspace
4 */
5export declare type ColorSpace = 'rgb' | 'hsl' | 'hwb' | 'lch' | 'lab';
6export declare type CSSColorRGBComp = CSSNumberish | 'none';
7export declare type CSSColorPercent = CSSNumberish | 'none';
8export declare type CSSColorNumber = CSSNumberish | 'none';
9export declare type CSSColorAngle = CSSNumberish | 'none';
10/**
11 * CSSColorValue is the base class used for the various CSS color interfaces.
12 *
13 * @see https://drafts.css-houdini.org/css-typed-om-1/#colorvalue-objects
14 */
15export declare abstract class CSSColorValue extends CSSStyleValue {
16 colorSpace: ColorSpace;
17 constructor(colorSpace: ColorSpace);
18 getType(): CSSStyleValueType;
19 /**
20 * @see https://drafts.css-houdini.org/css-typed-om-1/#dom-csscolorvalue-to
21 */
22 to(colorSpace: ColorSpace): CSSColorValue;
23}