0.0.5 • Published 10 months ago

@library/color v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

@library/color

Installation

npm

npm install @library/color

yarn

yarn add @library/color

API

hexToRgb

Convert a hexadecimal color code to its corresponding RGBA representation.

import { hexToRgb } from "@library/color";

hexToRgb("#f00"); // { r: 255, g: 0, b: 0, a: 1 }
hexToRgb("#f000"); // { r: 255, g: 0, b: 0, a: 0 }
hexToRgb("#7f11e0"); // { r: 127, g: 17, b: 224, a: 1 }
hexToRgb("#11223344"); // { r: 17, g: 34, b: 51, a: 0.27 }
0.0.3

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.2

3 years ago