import { HSLAColor, HSLColor, RGBAColor, RGBColor } from "../models.mjs"; import { Color } from "../instance.mjs"; //#region src/color/misc/get.d.ts /** * Get a foreground color _(usually text)_ based on a background color's luminance * * - Values that can be parsed are: hex(a) color strings, _HSL(A)_ color objects, and _RGB(A)_ color objects * - If the value cannot be parsed, a white foreground color will be returned * * @param value Original value * @returns Foreground color */ declare function getForegroundColor(value: unknown): Color; /** * Get the hex color _(with alpha channel, i.e., opacity)_ from any kind of value * * - Values that can be parsed are: hex(a) color strings, _HSL(A)_ color objects, and _RGB(A)_ color objects * - If the value cannot be parsed, a black hex color with an alpha channel of `0` will be returned * * @param value Original value * @returns Hex color string */ declare function getHexaColor(value: unknown): string; /** * Get the hex color from any kind of value * * - Values that can be parsed are: hex(a) color strings, _HSL(A)_ color objects, and _RGB(A)_ color objects * - If the value cannot be parsed, a black hex color will be returned * * @param value Original value * @returns Hex color string */ declare function getHexColor(value: unknown): string; declare function getHexValue(value: unknown): number; declare function getDegrees(value: unknown): number; /** * Get the _HSLA_ color from any kind of value * * - Values that can be parsed are: hex(a) color strings, _HSL(A)_ color objects, and _RGB(A)_ color objects * - If the value cannot be parsed, a black _HSLA_ color with an alpha channel _(opacity)_ of `0` will be returned * * @param value Original value * @returns _HSLA_ color */ declare function getHslaColor(value: unknown): HSLAColor; /** * Get the _HSL_ color from any kind of value * * - Values that can be parsed are: hex(a) color strings, _HSL(A)_ color objects, and _RGB(A)_ color objects * - If the value cannot be parsed, a black _HSL_ color will be returned * * @param value Original value * @returns _HSL_ color */ declare function getHslColor(value: unknown): HSLColor; declare function getPercentage(value: unknown): number; /** * Get the _RGBA_ color from any kind of value * * - Values that can be parsed are: hex(a) color strings, _HSL(A)_ color objects, and _RGB(A)_ color objects * - If the value cannot be parsed, a black _RGBA_ color with an alpha channel _(opacity)_ of `0` will be returned * * @param value Original value * @returns _RGBA_ color */ declare function getRgbaColor(value: unknown): RGBAColor; /** * Get the _RGB_ color from any kind of value * * - Values that can be parsed are: hex(a) color strings, _HSL(A)_ color objects, and _RGB(A)_ color objects * - If the value cannot be parsed, a black _RGB_ color will be returned * * @param value Original value * @returns _RGB_ color */ declare function getRgbColor(value: unknown): RGBColor; //#endregion export { getDegrees, getForegroundColor, getHexColor, getHexValue, getHexaColor, getHslColor, getHslaColor, getPercentage, getRgbColor, getRgbaColor };