---
id: fast-colors.parsecolorhexrgba
title: parseColorHexRGBA() function
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-colors](./fast-colors.md) &gt; [parseColorHexRGBA](./fast-colors.parsecolorhexrgba.md)

## parseColorHexRGBA() function

Converts a hexadecimal color string to a [ColorRGBA64](./fast-colors.colorrgba64.md)<!-- -->.

<b>Signature:</b>

```typescript
export declare function parseColorHexRGBA(raw: string): ColorRGBA64 | null;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  raw | string | a color string in the form of "\#RRGGBBAA" or "\#RGBA" |

<b>Returns:</b>

[ColorRGBA64](./fast-colors.colorrgba64.md) \| null

## Example


```ts
parseColorHexRGBA("#FF0000AA");
parseColorHexRGBA("#F00A");

```
