UNPKG

@bitbybit-dev/base

Version:

Bit By Bit Developers Base CAD Library to Program Geometry

123 lines (122 loc) 2.82 kB
import { Base } from "./base-inputs"; export declare namespace Color { class HexDto { constructor(color?: Base.Color); /** * Color hex * @default #0000ff */ color: Base.Color; } class InvertHexDto { constructor(color?: Base.Color); /** * Color hex * @default #0000ff */ color: Base.Color; /** * Choose to invert the color to black and white (useful for text color) */ blackAndWhite: boolean; } class HexDtoMapped { constructor(color?: Base.Color, from?: number, to?: number); /** * Color hex * @default #0000ff */ color: Base.Color; /** * From min bound * @default 0 * @minimum -Infinity * @maximum Infinity * @step 1 */ from: number; /** * To max bound * @default 255 * @minimum -Infinity * @maximum Infinity * @step 1 */ to: number; } class RGBObjectMaxDto { constructor(rgb?: Base.ColorRGB, max?: number); /** * Red value component * @default undefined */ rgb: Base.ColorRGB; /** * Min value of the range * @default 0 * @minimum 0 * @maximum 255 * @step 0.1 */ min: number; /** * Max value, it would automatically be remapped to whatever is needed if lower comes in * @default 255 * @minimum 0 * @maximum 255 * @step 0.1 */ max: number; } class RGBMinMaxDto { constructor(r?: number, g?: number, b?: number, min?: number, max?: number); /** * Red value component * @default 255 * @minimum 0 * @maximum 255 * @step 1 */ r: number; /** * Green value component * @default 255 * @minimum 0 * @maximum 255 * @step 1 */ g: number; /** * Blue value component * @default 255 * @minimum 0 * @maximum 255 * @step 1 */ b: number; /** * Min value of the range * @default 0 * @minimum 0 * @maximum 255 * @step 0.1 */ min: number; /** * Max value of the range * @default 255 * @minimum 0 * @maximum 255 * @step 0.1 */ max: number; } class RGBObjectDto { constructor(rgb?: Base.ColorRGB); /** * Red value component * @default undefined */ rgb: Base.ColorRGB; } }