@thi.ng/color-palettes
Version:
Collection of 200+ image based color themes & composable theme query filters
84 lines • 3.11 kB
TypeScript
import type { LCHTheme, RGBTheme, Theme, ThemePredicate } from "./api.js";
/**
* Returns given `theme` (array of colors or theme preset ID) as CSS color
* strings. If `reverse` is true (default: false), the theme colors will be
* returned in reverse order.
*
* @remarks
* The resulting format of CSS colors depends on the color type of the given
* theme (if given an array of colors), as well as on the currently active
* [default
* setting](https://docs.thi.ng/umbrella/color/functions/setDefaultCSSConversions.html)
* of the CSS conversions in thi.ng/color.
*
* @param theme
* @param reverse
*/
export declare const asCSS: (theme: number | Theme, reverse?: boolean) => string[];
/**
* Returns given `theme` (array of colors or theme preset ID) as packed ARGB
* integers. If `reverse` is true (default: false), the theme colors will be
* returned in reverse order.
*
* @remarks
* If given a theme ID, the alpha channel of all colors will always be set to
* `0xff`.
*
* @param theme
* @param reverse
*/
export declare const asInt: (theme: number | Theme, reverse?: boolean) => number[];
/**
* Returns given `theme` (array of colors or theme preset ID) as thi.ng/color
* LCH color vectors. If `reverse` is true (default: false), the theme colors
* will be returned in reverse order.
*
* @param theme
* @param reverse
*/
export declare const asLCH: (theme: number | Theme, reverse?: boolean) => LCHTheme;
/**
* Returns given `theme` (array of colors or theme preset ID) sRGB color
* vectors. If `reverse` is true (default: false), the theme colors will be
* returned in reverse order.
*
* @param theme
* @param reverse
*/
export declare const asRGB: (theme: number | Theme, reverse?: boolean) => RGBTheme;
/**
* Yields iterator of CSS themes (via {@link asCSS}). Yields all
* themes unless specific theme IDs or filter predicates are provided.
*
* @param preds
*/
export declare const cssThemes: (...preds: ThemePredicate[] | number[]) => IterableIterator<string[]>;
/**
* Yields iterator of packed ARGB integer themes (via {@link asInt}). Yields all
* themes unless specific theme IDs or filter predicates are provided.
*
* @param preds
*/
export declare const intThemes: (...preds: ThemePredicate[] | number[]) => IterableIterator<number[]>;
/**
* Yields iterator of LCH themes (via {@link asLCH}). Yields all
* themes unless specific theme IDs or filter predicates are provided.
*
* @param preds
*/
export declare const lchThemes: (...preds: ThemePredicate[] | number[]) => IterableIterator<LCHTheme>;
/**
* Yields iterator of RGB themes (via {@link asRGB}). Yields all
* themes unless specific theme IDs or filter predicates are provided.
*
* @param preds
*/
export declare const rgbThemes: (...preds: ThemePredicate[] | number[]) => IterableIterator<RGBTheme>;
/**
* Yields iterator of theme IDs (indices). Yields all themes unless specific
* theme IDs or filter predicates are provided.
*
* @param preds
*/
export declare const themeIDs: (...preds: ThemePredicate[] | number[]) => IterableIterator<number>;
//# sourceMappingURL=theme.d.ts.map