This is documentation for the next version of Grafana. For the latest stable release, go to the latest version.

API Reference@grafana/datagetColorFromHexRgbOrName

getColorFromHexRgbOrName() function

getColorFromHexRgbOrName() function

Signature

export declare function getColorFromHexRgbOrName(color: string, type?: GrafanaThemeType): string;

Import

import { getColorFromHexRgbOrName } from '@grafana/data';

Parameters

Parameter Type Description
color string
type GrafanaThemeType

Returns:

string