@promptbook/templates
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
56 lines (55 loc) • 1.51 kB
TypeScript
import type { string_color } from '../../types/string_person_fullname';
import type { WithTake } from '../take/interfaces/ITakeChain';
import type { Color } from './Color';
/**
* Shared immutable channel storage and serialization helpers for `Color`.
*
* @private base class of Color
*/
export declare abstract class ColorValue {
readonly red: number;
readonly green: number;
readonly blue: number;
readonly alpha: number;
protected constructor(red: number, green: number, blue: number, alpha?: number);
/**
* Shortcut for `red` property
* Number from 0 to 255
* @alias red
*/
get r(): number;
/**
* Shortcut for `green` property
* Number from 0 to 255
* @alias green
*/
get g(): number;
/**
* Shortcut for `blue` property
* Number from 0 to 255
* @alias blue
*/
get b(): number;
/**
* Shortcut for `alpha` property
* Number from 0 (transparent) to 255 (opaque)
* @alias alpha
*/
get a(): number;
/**
* Shortcut for `alpha` property
* Number from 0 (transparent) to 255 (opaque)
* @alias alpha
*/
get opacity(): number;
/**
* Shortcut for 1-`alpha` property
*/
get transparency(): number;
clone(): WithTake<Color>;
toString(): string_color;
toHex(): string_color;
toRgb(): string_color;
toHsl(): string_color;
protected abstract createColor(red: number, green: number, blue: number, alpha: number): Color;
}