UNPKG

rippleui

Version:

Cleanest, modern and beatifull Tailwind CSS library.

1 lines 484 B
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.palleteToRGB=exports.hexToRGB=void 0;const hexToRGB=e=>{const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t){return`${parseInt(t[1],16)} ${parseInt(t[2],16)} ${parseInt(t[3],16)}`}throw new Error("Invalid hexadecimal string")};exports.hexToRGB=hexToRGB;const palleteToRGB=(e={})=>{const t={};return Object.keys(e).map((o=>{t[o]=(0,exports.hexToRGB)(e[o])})),t};exports.palleteToRGB=palleteToRGB;