Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Windows Tipps & SecurityThe Blood of Dawnwalker Director Says 60 FPS Is Enough for This RPG(23.09.2026 um 14:37 Uhr)
Windows Tipps & SecurityMeyer Sound ernennt John McMahon zum Chief Operating Officer(23.09.2026 um 11:19 Uhr)
Windows Tipps & SecurityTouchscreen erweitert Grill-Sortiment am Point of Sale(23.09.2026 um 13:45 Uhr)
Windows Tipps & Security„When Worlds Unite“: ISE 2027 erweitert Messe und Programm(23.09.2026 um 13:45 Uhr)
Sichere ProgrammierungWhat Full-Stack AI Engineering Means in Real Projects(23.09.2026 um 14:00 Uhr)
Sichere ProgrammierungThe Internet Changes Everything (Slowly)(23.09.2026 um 14:09 Uhr)
Sichere ProgrammierungMAUI vs React Native vs Flutter vs Ionic(23.09.2026 um 14:09 Uhr)
Sichere ProgrammierungAI Tools Used in Modern Software Development(23.09.2026 um 14:22 Uhr)
Sichere ProgrammierungHealthAuditor — Website Health & SEO Audit Tool(23.09.2026 um 14:24 Uhr)
Windows Tipps & SecurityThe Blood of Dawnwalker Director Says 60 FPS Is Enough for This RPG(23.09.2026 um 14:37 Uhr)
Windows Tipps & SecurityMeyer Sound ernennt John McMahon zum Chief Operating Officer(23.09.2026 um 11:19 Uhr)
Windows Tipps & SecurityTouchscreen erweitert Grill-Sortiment am Point of Sale(23.09.2026 um 13:45 Uhr)
Windows Tipps & Security„When Worlds Unite“: ISE 2027 erweitert Messe und Programm(23.09.2026 um 13:45 Uhr)
Sichere ProgrammierungWhat Full-Stack AI Engineering Means in Real Projects(23.09.2026 um 14:00 Uhr)
Sichere ProgrammierungThe Internet Changes Everything (Slowly)(23.09.2026 um 14:09 Uhr)
Sichere ProgrammierungMAUI vs React Native vs Flutter vs Ionic(23.09.2026 um 14:09 Uhr)
Sichere ProgrammierungAI Tools Used in Modern Software Development(23.09.2026 um 14:22 Uhr)
Sichere ProgrammierungHealthAuditor — Website Health & SEO Audit Tool(23.09.2026 um 14:24 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

I open-sourced salt-theme-gen

I open-sourced salt-theme-gen — a zero-dependency OKLCH theme generator for JS/TS Theming often sounds simple until you actually try to do it well. You pick a primary color. Then you start adjusting secondary colors. Then dark mode looks …

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

I open-sourced salt-theme-gen — a zero-dependency OKLCH theme generator for JS/TS



Theming often sounds simple until you actually try to do it well.



You pick a primary color. Then you start adjusting secondary colors. Then dark mode looks wrong. Then hover and disabled states feel inconsistent. Then accessibility becomes a separate cleanup task. And after changing one base color, you end up reworking half the theme again.



That repeated pain is why I built salt-theme-gen.



It is an OKLCH-based design system generator for JavaScript and TypeScript that takes one color in and gives you a complete light and dark theme out.



It is:




  • zero dependency

  • written in TypeScript

  • platform agnostic

  • usable with React Native, React, Next.js, Node, Bun, Deno, or any JavaScript runtime






The problem I wanted to solve



I kept running into the same friction points:




  • picking colors that do not really work together

  • dark mode looking washed out or too contrasty

  • manually creating hover, pressed, focused, and disabled states

  • fixing accessibility late instead of designing for it early

  • having no easy way to compare theme versions

  • tweaking one color and then needing to manually re-derive everything else



I wanted a system that could generate a structured theme, not just a few colors.






What the library generates



From a single primary color, salt-theme-gen generates:




  • 21 semantic colors

  • complete light and dark themes

  • 32 interactive states

  • 4 surface elevation levels

  • an 18-entry accessibility report

  • 6 color harmony strategies

  • 20 nature-inspired presets



It also includes utilities like:




  • adjustTheme()

  • diffTheme()

  • parseThemeJSON()



So it is useful both for generating themes and for managing them over time.






Why OKLCH



I wanted the color system to be based on something more reliable than visual guesswork.



That is why the library uses OKLCH, which is much better for perceptual color relationships than just pushing RGB or hex values around directly.



The goal was not only to generate different colors, but to generate colors that feel more balanced and natural across both light and dark modes.



I also added harmony strategies like:




  • analogous

  • complementary

  • triadic

  • split-complementary

  • tetradic

  • monochromatic



So if someone wants a triadic or complementary palette but does not want to manually work out color relationships, the library can handle that too.






Accessibility and UI states were part of the design from the beginning



A theme generator should not stop at “here are some nice colors.”



I wanted it to help with real UI work.



So salt-theme-gen also generates:




  • WCAG AA-compliant on-colors

  • disabled states with minimum contrast targets

  • interactive states for all intents

  • accessibility reporting for common theme pairings



That makes it more useful for real product development, not only visual experimentation.






I also cared about AI-first developer experience



One thing I think is increasingly important: libraries should work well with AI coding tools.



Most libraries document their ideas, but not always their exact shapes.



With salt-theme-gen, I tried to make the README explicit enough that both humans and AI assistants can use it properly:




  • exact type shapes

  • full key names

  • full API signatures

  • complete exports list

  • architecture overview

  • derivation pipeline



That matters because when an AI assistant does not know the exact theme keys or return types, it starts guessing. And guessed integration code usually becomes broken integration code.



I wanted this library to be something AI tools could work with, not something they would keep hallucinating around.






Another thing I like: build-time usage



If your themes are static, you can generate them at build time and ship only the JSON result.



That means you can get the output without adding runtime generation logic to your production bundle.



And if your product needs runtime theme generation, you can still use it that way too.






Example






import { generateTheme } from "salt-theme-gen";

const theme = generateTheme({
primary: "#0E9D8E",
harmony: "complementary",
});









Links





I am actively maintaining the project, and I plan to add more nature-inspired presets in future updates.



I would really love feedback from developers working on design systems, theming, accessibility, or AI-assisted development.



What has been the most frustrating part of theme building in your projects?

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten I open-sourced salt-theme-gen

Thematisch verwandte Begriffe: opensourced, saltthemegen · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-5695 | Arbitrary file upload vulnerability due to a lack of proper validation in…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick