@aurigma/design-atoms-model
Version:
Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.
36 lines (35 loc) • 942 B
TypeScript
import { RgbColor } from "./RgbColor";
export declare class HsbColor {
private _h;
private _s;
private _b;
private _alpha;
constructor(h: number, s: number, b: number, alpha: number);
/**
* Hue in range [0, 1]
*/
get h(): number;
/**
* Saturation in range [0, 1]
*/
get s(): number;
/**
* Brightness in range [0, 1]
*/
get b(): number;
/**
* Alpha in range [0, 255]
*/
get alpha(): number;
static fromRgb(rgbColor: RgbColor): HsbColor;
toRgb(): RgbColor;
clone(): HsbColor;
decreaseHue(value: number): HsbColor;
increaseHue(value: number): HsbColor;
desaturate(value: number): HsbColor;
saturate(value: number): HsbColor;
darken(value: number): HsbColor;
lighten(value: number): HsbColor;
decreaseAlpha(value: number): HsbColor;
increaseAlpha(value: number): HsbColor;
}