
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
cli-hue-forge
Advanced tools
Generate OKLCH color shade ladders from CSS custom properties for modern theming. 🌈
Designed for Tailwind CSS v4:
This CLI generates an @theme { ... } block, which is the new convention for theming in Tailwind CSS v4. However, you can use the generated CSS variables in any CSS workflow, framework, or vanilla CSS as you like.
--generate-color-...@theme block with OKLCH lightness steps for each coloroklch(...)) via a flaglight-dark() variables for easy themingnpm install -g cli-hue-forge
pnpm add -g cli-hue-forge
Clone or download this repo, then run:
pnpm install
You can use the CLI without installing globally:
npx cli-hue-forge -i theme.css
# or
pnpm dlx cli-hue-forge -i theme.css
hueforge --input <yourfile.css>
Or with the short flag:
hueforge -i <yourfile.css>
-i, --input <file>: Path to the input CSS file (required)-o, --oklch: Output colors as oklch(...) instead of hex-f, --file <output>: Output file (e.g. gen.css). If not set, prints to stdout.-h, --help: Show help messageSuppose your CSS contains:
:root {
--generate-color-primary: #e6b97a;
--generate-color-accent: rgb(120, 200, 255);
}
hueforge -i theme.css
Output:
@theme {
--color-primary-98: #fff6e9;
--color-primary-95: #ffe9c7;
...
--color-primary-98-10: light-dark(var(--color-primary-98), var(--color-primary-10));
...
}
To enable the light-dark() functionality and apply your generated theme variables based on user preference, add the following snippet to your main CSS file. This toggles the data-theme attribute on <html> and sets the color-scheme property so built-in UI elements adapt correctly:
@layer base {
html[data-theme="light"] {
color-scheme: light;
}
html[data-theme="dark"] {
color-scheme: dark;
}
}
hueforge -i theme.css -f gen.css
This writes the generated CSS to gen.css.
After generating gen.css, you can import it into your project's CSS file(s) using:
@import "./gen.css";
This works with Tailwind CSS v4 and standard CSS workflows. 🐦
hueforge -i theme.css --oklch
Output:
@theme {
--color-primary-98: oklch(98.00% 0.0957 75.09);
--color-primary-95: oklch(95.00% 0.0957 75.09);
...
--color-primary-98-10: light-dark(var(--color-primary-98), var(--color-primary-10));
...
}
You can combine both flags: 🧃
hueforge -i theme.css --oklch -f gen.css
This writes OKLCH output to gen.css.
Pull requests and issues are welcome! Please open an issue for bugs or feature requests. 🛠️
MIT
For help or questions, open an issue at: 🆘 https://github.com/maxiviper117/cli-hue-forge/issues
FAQs
Generate OKLCH color shade ladders from CSS custom properties.
The npm package cli-hue-forge receives a total of 4 weekly downloads. As such, cli-hue-forge popularity was classified as not popular.
We found that cli-hue-forge demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.