convert/hex-to-rgb
v0.0.1
0.0.1
10
MIT
PUBLIC
46692
0     DEPENDENCIES
BuildPass

Converts a color from CSS hex format to CSS rgb format.

Use convert/hex-to-rgb in your project
npm i @bit/materialui.colors.convert.hex-to-rgb

convertHexToRGB (color:string) : string

Converts a color from CSS hex format to CSS rgb format.

Example

```js
 convertHexToRGB('#9f3') // => 'rgb(153, 255, 51)'
```

Argument

color: string

Hex color, i.e. #nnn or #nnnnnn

Returns

string

A CSS rgb color string

Test Summary


convertHexToRGB converts a short hex color to an rgb color` Pass
convertHexToRGB converts a long hex color to an rgb color` Pass