esaltws/salt-theme-gen ? reverse-engineered prompt
Reverse engineered prompt
Build me a small TypeScript library that turns one brand color into a full design theme.
I want to give it either a hex color or a preset name, and get back light and dark themes with semantic colors, tonal palettes, hover and pressed states, surface levels, spacing, radius, and font size scales. It should also output CSS variables, a Tailwind config helper, and a DTCG token export. Please include accessibility checks for WCAG and APCA, plus a way to simulate color blindness on a full theme or a single color.
Use OKLCH for all the color math, keep it zero dependency, and make the types strict. Add a simple main function like generateTheme({ primary: '#0E9D8E' }), and make the package work cleanly in Node and modern frontend apps. If you need to look up current docs online for any tricky color math or token format details, go ahead.
Are you gonna build this?
make sure you review the code using coderabbit