@angular-package/spectre.css
Version:
Modified Spectre.css - a lightweight, responsive, and modern CSS framework originally designed by Yan Zhu
40 lines (39 loc) • 2.31 kB
TypeScript
import { Color } from './color.class';
import { AffixedName } from '../../name';
import { Colors } from '../type/colors.type';
import { HSL } from '../type/hsl.type';
import { Shade } from '../type/shade.type';
export declare class CssPropertyColor<Prefix extends string | undefined, AvailableColor extends string = Colors, C extends AvailableColor = AvailableColor> extends Color<Prefix, 'color', AvailableColor, C> {
#private;
static rootStyle: CSSStyleDeclaration;
get hue(): number;
get hex(): string;
get hsl(): HSL;
get lightness(): number;
get saturation(): number;
static getHueOfVar(name: string): number;
static getLightnessOfVar(name: string): number;
static getSaturationOfVar(name: string): number;
static getHexOfVar(name: string): string;
static removeHueOfVar(name: string): typeof CssPropertyColor;
static removeLightnessOfVar(name: string): typeof CssPropertyColor;
static removeSaturationOfVar(name: string): typeof CssPropertyColor;
static removeColorOfVar(name: string): typeof CssPropertyColor;
static setHueOfVar(name: string, value: number | null, priority?: 'important' | ''): typeof CssPropertyColor;
static setLightnessOfVar(name: string, value: number | null, priority?: 'important' | ''): typeof CssPropertyColor;
static setSaturationOfVar(name: string, value: number | null, priority?: 'important' | ''): typeof CssPropertyColor;
constructor(color: C, prefix?: Prefix, availableColor?: AvailableColor[]);
getHex(shade?: Shade): string;
getHSL(shade?: Shade): HSL;
getHue(shade?: Shade): number;
getLightness(shade?: Shade): number;
getSaturation(shade?: Shade): number;
getValue<S extends Shade>(shade?: S): AffixedName<Prefix, C, 'color'> | `${AffixedName<Prefix, C, 'color'>}-${S}`;
removeColor(shade?: Shade): this;
setHex(hex: string, shade?: Shade): this;
setHsl(hue: number, saturation: number, lightness: number): this;
setHue(value: number, shade?: Shade, priority?: 'important' | ''): this;
setLightnessOfVar(value: number, shade?: Shade, priority?: 'important' | ''): this;
setSaturationOfVar(value: number, shade?: Shade, priority?: 'important' | ''): this;
valueOfShade<S extends Shade>(shade: S): `${AffixedName<Prefix, C, 'color'>}-${S}`;
}