UNPKG

dynamic-theme-utilities

Version:

The dynamic-theme-utilities is a JavaScript package designed to facilitate the creation and manipulation of dynamic themes, particularly for Material Design color schemes.

14 lines (12 loc) 278 B
import { convertToHex } from "./hex"; import { convertToRGB } from "./rgb"; export const convertColor = (color, to) => { switch (to) { case "rgb": return convertToRGB(color); case "hex": return convertToHex(color); default: return color; } };