Share your code. Components are building blocks, you are the architect.

convert/hex-to-rgb
v0.0.1
0.0.1
MIT
PUBLIC
46692
0     DEPENDENCIES
Build: pass
BuildPass
Build Status: pass
Converts a color from CSS hex format to CSS rgb format.

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use convert/hex-to-rgb in your project
npm i @bit/materialui.colors.convert.hex-to-rgb
Copied

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