UNPKG

@fluentui/react

Version:

Reusable React components for building web experiences.

11 lines (10 loc) 492 B
import type { IColor } from './interfaces'; /** * Converts a CSS color string to a color object. * Note that hex colors *must* be prefixed with # to be considered valid. * * `inputColor` will be used unmodified as the `str` property of the returned object. * Alpha defaults to 100 if not specified in `inputColor`. * Returns undefined if the color string is invalid/not recognized. */ export declare function getColorFromString(inputColor: string, doc?: Document): IColor | undefined;