+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "getTagColorsFromName"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++

## getTagColorsFromName() function

### getTagColorsFromName() function

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

<b>Signature</b>

```typescript
export declare function getTagColorsFromName(name?: string): {
    color: string;
    borderColor: string;
};
```
<b>Import</b>

```typescript
import { getTagColorsFromName } from '@grafana/ui';
```
<b>Parameters</b>

|  Parameter | Type | Description |
|  --- | --- | --- |
|  name | <code>string</code> | tag name |

<b>Returns:</b>

`{
    color: string;
    borderColor: string;
}`

