Created
May 21, 2020 10:11
-
-
Save LennardWesterveld/6aca483e6d5db8be79a0655bcae125c0 to your computer and use it in GitHub Desktop.
leonardo-contrast-colors typings fo typescript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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