Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LennardWesterveld/6aca483e6d5db8be79a0655bcae125c0 to your computer and use it in GitHub Desktop.
Save LennardWesterveld/6aca483e6d5db8be79a0655bcae125c0 to your computer and use it in GitHub Desktop.
leonardo-contrast-colors typings fo typescript
declare module '@adobe/leonardo-contrast-colors' {
export interface IColorScale {
name: string;
colorKeys: string[];
colorspace: string;
ratios: number[];
}
export interface IColorSettings {
baseScale?: string;
brightness: number;
contrast: number;
colorScales: IColorScale[];
}
export interface IAdaptiveThemeBackground {
background: string;
}
export interface IAdaptiveColorPallet {
name: string;
values: {
name: string;
contrast: number;
value: string;
}[];
}
export type AdaptiveTheme = IAdaptiveThemeBackground | IAdaptiveColorPallet;
declare function generateAdaptiveTheme(settings: IColorSettings): AdaptiveTheme[];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment