A utility to generate and map color shades from a given theme configuration, designed for the Streamwind boilerplate Wordpress theme and suitable for integration with frameworks like Tailwind CSS. It provides functions to access nested theme properties, generate shades for a given color, and map colors with their shades from a theme configuration file.
theme.json
to tailwind.config.js
To install the package, run:
npm i streamwind-package
To use the package, import it in your project:
const streamwind = require("streamwind-package");
const propertyValue = streamwind.theme("path.to.property", themeObject);
const shades = streamwind.generateShades(
color,
[100, 200, 300, 400, 500, 600, 700, 800, 900, 950],
baseShade
);
const tailwindColors = streamwind.colorMapper(colors, colorOptions);
This project is licensed under the MIT License. See the LICENSE file for more information.