getTagColorsFromName() function

getTagColorsFromName() function

Returns tag badge background and border colors based on hashed tag name.

Signature

  1. export declare function getTagColorsFromName(name?: string): {
  2. color: string;
  3. borderColor: string;
  4. };

Import

  1. import { getTagColorsFromName } from '@grafana/ui';

Parameters

ParameterTypeDescription
namestringtag name

Returns:

{ color: string; borderColor: string; }