UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Microsoft 365.

11 lines (10 loc) 471 B
import { 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): IColor | undefined;