@artifak/hextorgba

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

Usage no npm install needed!

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

README

@artifak/hextorgba

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

Installation

Yarn

yarn add @artifak/hextorgba

NPM

npm install @artifak/hextorgba

Usage

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

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