@thangk/easythemer
Version:
Easily generate shades from a colour palette for use in your app
44 lines (43 loc) • 1.11 kB
TypeScript
import { TYPE } from "./constants";
import { Hex, ChannelParams, ShadeOption, ShadeFactorsSet } from "./types";
export interface RawHSL {
type: TYPE.HSL;
h: number;
s: number;
l: number;
}
export interface RawChannelParams {
type: TYPE.CHANNEL_PARAMS;
channel: string;
useBounds?: boolean;
upperboundDivider?: number;
lowerboundDivider?: number;
upperboundPadding?: number;
lowerboundPadding?: number;
}
export interface RawShadeOption {
type: TYPE.SHADE_OPTION;
optionName: string;
hex: Hex;
generateShades: boolean;
channelParams?: ChannelParams[];
}
export interface RawShadeFactorsSet {
type: TYPE.SHADE_FACTORS_SET;
setName: string;
shadeFactors: {
[shadeFactorName: string]: number;
};
}
export interface RawShadesSet {
type: TYPE.SHADES_SET;
setName: string;
shades: {
[shadeName: string]: Hex;
};
}
export interface RawUseThemerProp {
type: TYPE.USE_THEMER_PROP;
shadeOptions?: ShadeOption[];
shadeFactorsSets?: ShadeFactorsSet[];
}