BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/weekendsuperhero-io/sistine/theme-generator

Theme Generator

weekendsuperhero-io-sistine/theme-generator
FreeUtility

Generate light/dark theme CSS (including glass-effect variables) from a set of base colors.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/Weekendsuperhero-io/sistine/main/public/r/theme-generator.json

Source

lib/theme-generator.tsraw.githubusercontent.com/Weekendsuperhero-io/sistine/main/public/r/theme-generator.json · first 6 KB
1export interface ThemeColors {
2 primary: string;
3 primaryForeground: string;
4 background: string;
5 foreground: string;
6 card: string;
7 cardForeground: string;
8 popover: string;
9 popoverForeground: string;
10 secondary: string;
11 secondaryForeground: string;
12 muted: string;
13 mutedForeground: string;
14 accent: string;
15 accentForeground: string;
16 destructive: string;
17 destructiveForeground: string;
18 border: string;
19 input: string;
20 ring: string;
21 radius?: string;
22 // Glass effect variables
23 glassBg?: string;
24 glassBorder?: string;
25 glassShadow?: string;
26 glassShadowLg?: string;
27 glassShadowSm?: string;
28 blur?: string;
29 blurSm?: string;
30 blurLg?: string;
31 // Dark mode glass variables
32 darkGlassBg?: string;
33 darkGlassBorder?: string;
34 darkGlassShadow?: string;
35 darkGlassShadowLg?: string;
36 darkGlassShadowSm?: string;
37}
38
39export function generateThemeCSS(colors: ThemeColors, darkColors?: Partial<ThemeColors>): string {
40 const lightTheme = `:root {
41 --radius: ${colors.radius || "0.625rem"};
42 --primary: ${colors.primary};
43 --primary-foreground: ${colors.primaryForeground};
44 --background: ${colors.background};
45 --foreground: ${colors.foreground};
46 --card: ${colors.card};
47 --card-foreground: ${colors.cardForeground};
48 --popover: ${colors.popover};
49 --popover-foreground: ${colors.popoverForeground};
50 --secondary: ${colors.secondary};
51 --secondary-foreground: ${colors.secondaryForeground};
52 --muted: ${colors.muted};
53 --muted-foreground: ${colors.mutedForeground};
54 --accent: ${colors.accent};
55 --accent-foreground: ${colors.accentForeground};
56 --destructive: ${colors.destructive};
57 --destructive-foreground: ${colors.destructiveForeground};
58 --border: ${colors.border};
59 --input: ${colors.input};
60 --ring: ${colors.ring};
61
62 /* Glass effect variables - Enhanced with gradient tint and border glow */
63 --glass-bg: ${colors.glassBg || "linear-gradient(in oklch, 135deg, oklch(100.000% 0.000000 0.000000 / 0.400000) 0%, oklch(100.000% 0.000000 0.000000 / 0.250000) 50%, oklch(97.6470% 0.010680 245.000000 / 0.300000) 100%)"};
64 --glass-border: ${colors.glassBorder || "oklch(100.000% 0.000000 0.000000 / 0.300000)"};
65 --glass-shadow: ${colors.glassShadow || "0 8px 32px oklch(0.000000% 0.000000 0.000000 / 0.120000), 0 2px 8px oklch(0.000000% 0.000000 0.000000 / 0.080000), 0 0 0 1px oklch(100.000% 0.000000 0.000000 / 0.100000) inset, 0 0 20px oklch(100.000% 0.000000 0.000000 / 0.050000)"};
66// … truncated

Files it writes

  • lib/theme-generator.ts

Facts

Registry
weekendsuperhero-io/sistine
Type
registry:lib
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

weekendsuperhero.io Weekendsuperhero-io/sistine on GitHub Raw registry item This item as JSON

More from weekendsuperhero-io/sistine

All 71 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Canvas Background Utilscanvas-background-utilsweekendsuperhero-io/sistineUtilitiesFreeno deps
Gradient Utilsgradient-utilsweekendsuperhero-io/sistineUtilitiesFreeno deps
Hover Effectshover-effectsweekendsuperhero-io/sistineUtilitiesFree1 dep
Material Systemmaterialweekendsuperhero-io/sistineUtilitiesFreeno deps
OKLCH Utilsoklch-utilsweekendsuperhero-io/sistineUtilitiesFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex