names.d.ts 631 B

12345678910111213141516171819
  1. import { Plugin } from "../extend";
  2. interface ConvertOptions {
  3. closest?: boolean;
  4. }
  5. declare module "../colord" {
  6. interface Colord {
  7. /** Finds CSS color keyword that matches with the color value */
  8. toName(options?: ConvertOptions): string | undefined;
  9. }
  10. }
  11. /**
  12. * Plugin to work with named colors.
  13. * Adds a parser to read CSS color names and `toName` method.
  14. * See https://www.w3.org/TR/css-color-4/#named-colors
  15. * Supports 'transparent' string as defined in
  16. * https://drafts.csswg.org/css-color/#transparent-color
  17. */
  18. declare const namesPlugin: Plugin;
  19. export default namesPlugin;