UNPKG

@ux-aspects/ux-aspects

Version:

Open source user interface framework for building modern, responsive, mobile big data applications

69 lines (68 loc) 1.98 kB
export declare class ThemeColor { private _r; private _g; private _b; private _a; constructor(_r: string, _g: string, _b: string, _a?: string); /** * Create a ThemeColor object from a CSS color string * @param value The CSS color string to derive a ThemeColor object from */ static parse(value: string): ThemeColor; /** * Clone a theme color so it can be modified without affecting other places using the color * @param themeColor The original theme color to clone */ static from(themeColor: ThemeColor): ThemeColor; /** * Determine if an object is an instance of a theme color. * Using a simple instanceof check will not always work in plunker * where the ThemeColor is from @ux-aspects/ux-aspects and the color * comes from @micro-focus/ux-aspects */ static isInstanceOf(themeColor: unknown): themeColor is ThemeColor; /** * Convert the theme color to a CSS hex color code */ toHex(): string; /** * Convert the theme color to a CSS rgb color code */ toRgb(): string; /** * Convert the theme color to a CSS rgbs color code */ toRgba(): string; /** * Get the red value from the RGBA color value */ getRed(): string; /** * Get the green value from the RGBA color value */ getGreen(): string; /** * Get the blue value from the RGBA color value */ getBlue(): string; /** * Get the alpha value from the RGBA color value */ getAlpha(): string; /** * Set the red value from the RGBA color value */ setRed(red: string): this; /** * Set the green value from the RGBA color value */ setGreen(green: string): this; /** * Set the blue value from the RGBA color value */ setBlue(blue: string): this; /** * Set the alpha value from the RGBA color value */ setAlpha(alpha: string | number): this; }