material-chalk
Version:
Generate beautiful colors from namespaces based on color theory
20 lines (19 loc) • 979 B
text/typescript
import { type DynamicScheme, type Hct } from "@material/material-color-utilities";
type Constructor = new (...args: any[]) => DynamicScheme;
/**
* Overrides the primaryPalette of the DynamicScheme at constructor-time
*/
export declare function sourceAsPrimary<T extends Constructor>(baseScheme: T): T;
/**
* Overrides the primaryPalette of the DynamicScheme at runtime
*/
export declare function overrideSourceAsPrimary<T extends DynamicScheme>(dynamicScheme: T): T;
/**
* Constructor signature used by schemes shipped with Material Design v3
*/
export type SchemeConstructor<Args extends any[], Result extends DynamicScheme> = new (sourceColorHct: Hct, ...args: Args) => Result;
/**
* Returns a DynamicScheme constructor with the first parameter pre-filled with the constructed color
*/
export declare function buildScheme<Args extends any[], Result extends DynamicScheme>(Scheme: SchemeConstructor<Args, Result>, fixedValue: Hct): (...args: Args) => Result;
export {};