UNPKG

1.16 kBSource Map (JSON)View Raw
1{"version":3,"file":"interfaces.js","sourceRoot":"../src/","sources":["utilities/color/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["/** RGB color with optional alpha value. */\nexport interface IRGB {\n /** Red, range 0-255. */\n r: number;\n /** Green, range 0-255. */\n g: number;\n /** Blue, range 0-255. */\n b: number;\n /** Alpha, range 0 (transparent)-100. Usually assumed to be 100 if not specified. */\n a?: number;\n}\n\nexport interface IHSV {\n /** Hue, range 0-359. */\n h: number;\n /** Saturation, range 0-100. */\n s: number;\n /** Value, range 0-100. */\n v: number;\n}\n\nexport interface IHSL {\n /** Hue, range 0-359. */\n h: number;\n /** Saturation, range 0-100. */\n s: number;\n /** Lightness, range 0-100. */\n l: number;\n}\n\nexport interface IColor extends IRGB, IHSV {\n /** Hex string for the color (excluding alpha component), *not* prefixed with #. */\n hex: string;\n\n /** CSS color string. If a hex value, it must be prefixed with #. */\n str: string;\n\n /** Transparency value, range 0 (opaque) to 100 (transparent). Usually assumed to be 0 if not specified. */\n t?: number;\n}\n"]}
\No newline at end of file