puzzlescript
Version:
Play PuzzleScript games in your terminal!
34 lines (33 loc) • 1.01 kB
TypeScript
import { Optional } from '../util';
import { BaseForLines, IGameCode } from './BaseForLines';
import { IGameNode } from './game';
export declare class RGB {
readonly r: number;
readonly g: number;
readonly b: number;
readonly a: Optional<number>;
constructor(r: number, g: number, b: number, a: Optional<number>);
isDark(): boolean;
}
export interface IColor extends IGameNode {
isTransparent: () => boolean;
hasAlpha: () => boolean;
toRgb: () => RGB;
toHex: () => string;
}
export declare class HexColor extends BaseForLines implements IColor {
private hex;
constructor(source: IGameCode, hex: string);
isTransparent(): boolean;
hasAlpha(): boolean;
toRgb(): RGB;
toHex(): string;
}
export declare class TransparentColor extends BaseForLines implements IColor {
constructor(source: IGameCode);
isTransparent(): boolean;
hasAlpha(): boolean;
toRgb(): RGB;
toHex(): string;
}
export declare function hexToRgb(hex: string): RGB;