@artifak/hextorgb

Utility function to convert style hex colour codes to RGB string.

Usage no npm install needed!

<script type="module">
  import artifakHextorgb from 'https://cdn.skypack.dev/@artifak/hextorgb';
</script>

README

@artifak/hextorgb

A utility function to convert hexadecimal colour values to RGB string.

Installation

Yarn

yarn add @artifak/hextorgb

NPM

npm install @artifak/hextorgb

Usage

import { hexToRGB } from 'artifak';
import styled from 'styled-components';

export const Container = styled.div`
  margin: 0 auto;
  width: 100%;
  background: #000;
  color: ${hexToRGB('#FFF')};
`;