diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:10:59 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:41:44 +0800 |
| commit | fc87c009806dcc98867f6b58efe29b042aa01dee (patch) | |
| tree | 8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/colord/plugins/a11y.d.ts | |
| parent | 3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff) | |
node: updatemain
Diffstat (limited to 'node_modules/colord/plugins/a11y.d.ts')
| -rw-r--r-- | node_modules/colord/plugins/a11y.d.ts | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/node_modules/colord/plugins/a11y.d.ts b/node_modules/colord/plugins/a11y.d.ts deleted file mode 100644 index 69a10cb1..00000000 --- a/node_modules/colord/plugins/a11y.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { AnyColor } from "../types";
-import { Plugin } from "../extend";
-interface ReadabilityOptions {
- level?: "AA" | "AAA";
- size?: "normal" | "large";
-}
-declare module "../colord" {
- interface Colord {
- /**
- * Returns the relative luminance of a color,
- * normalized to 0 for darkest black and 1 for lightest white.
- * https://www.w3.org/TR/WCAG20/#relativeluminancedef
- * https://developer.mozilla.org/en-US/docs/Web/Accessibility/Understanding_Colors_and_Luminance
- */
- luminance(): number;
- /**
- * Calculates a contrast ratio for a color pair.
- * This luminance difference is expressed as a ratio ranging
- * from 1 (e.g. white on white) to 21 (e.g., black on a white).
- * WCAG requires a ratio of at least 4.5 for normal text and 3 for large text.
- * https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html
- * https://webaim.org/articles/contrast/
- */
- contrast(color2?: AnyColor | Colord): number;
- /**
- * Checks that a background and text color pair conforms to WCAG 2.0 requirements.
- * https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html
- */
- isReadable(color2?: AnyColor | Colord, options?: ReadabilityOptions): boolean;
- }
-}
-/**
- * A plugin adding accessibility and color contrast utilities.
- * Follows Web Content Accessibility Guidelines 2.0.
- * https://www.w3.org/TR/WCAG20/
- */
-declare const a11yPlugin: Plugin;
-export default a11yPlugin;
|
