@3xpo/svelte-colour-picker
Version:
A highly customizable color picker component library
31 lines (30 loc) • 882 B
TypeScript
import type { A11yColor } from '../type/types';
/**
* compute the resulting color of hexA over hexB. If hexB has transparency, computes it over a white background
* @param hexA
* @param hexB
* @returns
*/
export declare const mix: (hexA: string, hexB?: string) => string;
export declare const getContrast: (a11yColor: A11yColor, hex: string | undefined) => {
trueColors: {
textColor: string;
bgColor: string;
};
contrast: number;
placeholder?: string | undefined;
size?: "normal" | "large" | undefined;
textHex: string;
bgHex?: string | undefined;
reverse: true;
} | {
trueColors: {
textColor: string;
bgColor: string;
};
contrast: number;
placeholder?: string | undefined;
size?: "normal" | "large" | undefined;
bgHex?: string | undefined;
reverse?: false | undefined;
} | undefined;