Styledex
← Index

Cosmic Night

tweakcnApache-2.0Light and dark · bothMedium · mediumBlue · blueVivid · vividSerif · serifGeneral · generalLanding · landingProfessional · professional

A theme based on the Cosmic Night color palette.

NNorthwind
Product · Pricing
Specimen
Make the work feel finished

One interface, dressed in this style. Compare type, color, radius, and density.

128
Active
4.8
Score
12ms
Edge

Attribution

"Cosmic Night" from https://github.com/jnsahaj/tweakcn (Apache-2.0). © jnsahaj. r/themes/cosmic-night.json @ a3b47b37cba9.

https://github.com/jnsahaj/tweakcn · r/themes/cosmic-night.json · a3b47b37cba9 · © jnsahaj

Prompt

Design a user interface in the "Cosmic Night" style.

A theme based on the Cosmic Night color palette.

Apply these tokens to every surface. Do not invent a second palette.
- Background oklch(0.9730 0.0133 286.1503), foreground oklch(0.3015 0.0572 282.4176)
- Primary oklch(0.5417 0.1790 288.0332) on oklch(1.0000 0 0)
- Accent oklch(0.9221 0.0373 262.1410), muted oklch(0.9580 0.0133 286.1454), border oklch(0.9115 0.0216 285.9625)
- Radius 0.5rem, type Inter, sans-serif
- Shadow: 0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04)

"Cosmic Night" from https://github.com/jnsahaj/tweakcn (Apache-2.0). © jnsahaj. r/themes/cosmic-night.json @ a3b47b37cba9.
powered by Styledex — https://styledex.dev

Tokens

DTCG

{
  "$schema": "https://www.designtokens.org/schemas/2025.10/format.json",
  "$description": "Cosmic Night. \"Cosmic Night\" from https://github.com/jnsahaj/tweakcn (Apache-2.0). © jnsahaj. r/themes/cosmic-night.json @ a3b47b37cba9.",
  "$extensions": {
    "dev.styledex": {
      "id": "tweakcn-cosmic-night",
      "license": "Apache-2.0",
      "attribution": "\"Cosmic Night\" from https://github.com/jnsahaj/tweakcn (Apache-2.0). © jnsahaj. r/themes/cosmic-night.json @ a3b47b37cba9.",
      "banner": "powered by Styledex — https://styledex.dev"
    }
  },
  "color": {
    "background": {
      "$type": "color",
      "$value": "oklch(0.9730 0.0133 286.1503)"
    },
    "foreground": {
      "$type": "color",
      "$value": "oklch(0.3015 0.0572 282.4176)"
    },
    "card": {
      "$type": "color",
      "$value": "oklch(1.0000 0 0)"
    },
    "card-foreground": {
      "$type": "color",
      "$value": "oklch(0.3015 0.0572 282.4176)"
    },
    "primary": {
      "$type": "color",
      "$value": "oklch(0.5417 0.1790 288.0332)"
    },
    "primary-foreground": {
      "$type": "color",
      "$value": "oklch(1.0000 0 0)"
    },
    "secondary": {
      "$type": "color",
      "$value": "oklch(0.9174 0.0435 292.6901)"
    },
    "secondary-foreground": {
      "$type": "color",
      "$value": "oklch(0.4143 0.1039 288.1742)"
    },
    "accent": {
      "$type": "color",
      "$value": "oklch(0.9221 0.0373 262.1410)"
    },
    "accent-foreground": {
      "$type": "color",
      "$value": "oklch(0.3015 0.0572 282.4176)"
    },
    "muted": {
      "$type": "color",
      "$value": "oklch(0.9580 0.0133 286.1454)"
    },
    "muted-foreground": {
      "$type": "color",
      "$value": "oklch(0.5426 0.0465 284.7435)"
    },
    "border": {
      "$type": "color",
      "$value": "oklch(0.9115 0.0216 285.9625)"
    },
    "destructive": {
      "$type": "color",
      "$value": "oklch(0.6861 0.2061 14.9941)"
    },
    "ring": {
      "$type": "color",
      "$value": "oklch(0.5417 0.1790 288.0332)"
    }
  },
  "font": {
    "sans": {
      "$type": "fontFamily",
      "$value": [
        "Inter",
        "sans-serif"
      ]
    },
    "serif": {
      "$type": "fontFamily",
      "$value": [
        "Georgia",
        "serif"
      ]
    },
    "mono": {
      "$type": "fontFamily",
      "$value": [
        "JetBrains Mono",
        "monospace"
      ]
    }
  },
  "radius": {
    "base": {
      "$type": "dimension",
      "$value": "0.5rem"
    }
  },
  "spacing": {
    "base": {
      "$type": "dimension",
      "$value": "0.25rem"
    }
  },
  "shadow": {
    "base": {
      "$type": "shadow",
      "$value": "0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04)"
    }
  },
  "dark": {
    "color": {
      "background": {
        "$type": "color",
        "$value": "oklch(0.1743 0.0227 283.7998)"
      },
      "foreground": {
        "$type": "color",
        "$value": "oklch(0.9185 0.0257 285.8834)"
      },
      "card": {
        "$type": "color",
        "$value": "oklch(0.2284 0.0384 282.9324)"
      },
      "card-foreground": {
        "$type": "color",
        "$value": "oklch(0.9185 0.0257 285.8834)"
      },
      "primary": {
        "$type": "color",
        "$value": "oklch(0.7162 0.1597 290.3962)"
      },
      "primary-foreground": {
        "$type": "color",
        "$value": "oklch(0.1743 0.0227 283.7998)"
      },
      "secondary": {
        "$type": "color",
        "$value": "oklch(0.3139 0.0736 283.4591)"
      },
      "secondary-foreground": {
        "$type": "color",
        "$value": "oklch(0.8367 0.0849 285.9111)"
      },
      "accent": {
        "$type": "color",
        "$value": "oklch(0.3354 0.0828 280.9705)"
      },
      "accent-foreground": {
        "$type": "color",
        "$value": "oklch(0.9185 0.0257 285.8834)"
      },
      "muted": {
        "$type": "color",
        "$value": "oklch(0.2710 0.0621 281.4377)"
      },
      "muted-foreground": {
        "$type": "color",
        "$value": "oklch(0.7166 0.0462 285.1741)"
      },
      "border": {
        "$type": "color",
        "$value": "oklch(0.3261 0.0597 282.5832)"
      },
      "destructive": {
        "$type": "color",
        "$value": "oklch(0.6861 0.2061 14.9941)"
      },
      "ring": {
        "$type": "color",
        "$value": "oklch(0.7162 0.1597 290.3962)"
      }
    }
  }
}

CSS

/* powered by Styledex — https://styledex.dev */
/* "Cosmic Night" from https://github.com/jnsahaj/tweakcn (Apache-2.0). © jnsahaj. r/themes/cosmic-night.json @ a3b47b37cba9. */
:root {
  --background: oklch(0.9730 0.0133 286.1503);
  --foreground: oklch(0.3015 0.0572 282.4176);
  --card: oklch(1.0000 0 0);
  --card-foreground: oklch(0.3015 0.0572 282.4176);
  --primary: oklch(0.5417 0.1790 288.0332);
  --primary-foreground: oklch(1.0000 0 0);
  --secondary: oklch(0.9174 0.0435 292.6901);
  --secondary-foreground: oklch(0.4143 0.1039 288.1742);
  --accent: oklch(0.9221 0.0373 262.1410);
  --accent-foreground: oklch(0.3015 0.0572 282.4176);
  --muted: oklch(0.9580 0.0133 286.1454);
  --muted-foreground: oklch(0.5426 0.0465 284.7435);
  --border: oklch(0.9115 0.0216 285.9625);
  --destructive: oklch(0.6861 0.2061 14.9941);
  --ring: oklch(0.5417 0.1790 288.0332);
  --radius: 0.5rem;
  --font-sans: Inter, sans-serif;
  --font-serif: Georgia, serif;
  --font-mono: JetBrains Mono, monospace;
  --spacing: 0.25rem;
  --shadow: 0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
}

.dark {
  --background: oklch(0.1743 0.0227 283.7998);
  --foreground: oklch(0.9185 0.0257 285.8834);
  --card: oklch(0.2284 0.0384 282.9324);
  --card-foreground: oklch(0.9185 0.0257 285.8834);
  --primary: oklch(0.7162 0.1597 290.3962);
  --primary-foreground: oklch(0.1743 0.0227 283.7998);
  --secondary: oklch(0.3139 0.0736 283.4591);
  --secondary-foreground: oklch(0.8367 0.0849 285.9111);
  --accent: oklch(0.3354 0.0828 280.9705);
  --accent-foreground: oklch(0.9185 0.0257 285.8834);
  --muted: oklch(0.2710 0.0621 281.4377);
  --muted-foreground: oklch(0.7166 0.0462 285.1741);
  --border: oklch(0.3261 0.0597 282.5832);
  --destructive: oklch(0.6861 0.2061 14.9941);
  --ring: oklch(0.7162 0.1597 290.3962);
  --radius: 0.5rem;
  --font-sans: Inter, sans-serif;
  --font-serif: Georgia, serif;
  --font-mono: JetBrains Mono, monospace;
  --spacing: 0.25rem;
  --shadow: 0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
}

Tailwind

/* powered by Styledex — https://styledex.dev */
/* "Cosmic Night" from https://github.com/jnsahaj/tweakcn (Apache-2.0). © jnsahaj. r/themes/cosmic-night.json @ a3b47b37cba9. */
/** Tailwind theme extend for Cosmic Night (tweakcn-cosmic-night) */
module.exports = {
  "theme": {
    "extend": {
      "colors": {
        "background": "oklch(0.9730 0.0133 286.1503)",
        "foreground": "oklch(0.3015 0.0572 282.4176)",
        "card": "oklch(1.0000 0 0)",
        "primary": "oklch(0.5417 0.1790 288.0332)",
        "primary-foreground": "oklch(1.0000 0 0)",
        "secondary": "oklch(0.9174 0.0435 292.6901)",
        "accent": "oklch(0.9221 0.0373 262.1410)",
        "muted": "oklch(0.9580 0.0133 286.1454)",
        "border": "oklch(0.9115 0.0216 285.9625)",
        "destructive": "oklch(0.6861 0.2061 14.9941)",
        "ring": "oklch(0.5417 0.1790 288.0332)"
      },
      "borderRadius": {
        "lg": "0.5rem"
      },
      "fontFamily": {
        "sans": [
          "Inter",
          "sans-serif"
        ],
        "serif": [
          "Georgia",
          "serif"
        ],
        "mono": [
          "JetBrains Mono",
          "monospace"
        ]
      },
      "boxShadow": {
        "styledex": "0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04)"
      }
    }
  }
};

shadcn

/* powered by Styledex — https://styledex.dev */
/* "Cosmic Night" from https://github.com/jnsahaj/tweakcn (Apache-2.0). © jnsahaj. r/themes/cosmic-night.json @ a3b47b37cba9. */
@layer base {
:root {
  --background: oklch(0.9730 0.0133 286.1503);
  --foreground: oklch(0.3015 0.0572 282.4176);
  --card: oklch(1.0000 0 0);
  --card-foreground: oklch(0.3015 0.0572 282.4176);
  --primary: oklch(0.5417 0.1790 288.0332);
  --primary-foreground: oklch(1.0000 0 0);
  --secondary: oklch(0.9174 0.0435 292.6901);
  --secondary-foreground: oklch(0.4143 0.1039 288.1742);
  --accent: oklch(0.9221 0.0373 262.1410);
  --accent-foreground: oklch(0.3015 0.0572 282.4176);
  --muted: oklch(0.9580 0.0133 286.1454);
  --muted-foreground: oklch(0.5426 0.0465 284.7435);
  --border: oklch(0.9115 0.0216 285.9625);
  --destructive: oklch(0.6861 0.2061 14.9941);
  --ring: oklch(0.5417 0.1790 288.0332);
  --radius: 0.5rem;
  --font-sans: Inter, sans-serif;
  --font-serif: Georgia, serif;
  --font-mono: JetBrains Mono, monospace;
  --spacing: 0.25rem;
  --shadow: 0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
}

.dark {
  --background: oklch(0.1743 0.0227 283.7998);
  --foreground: oklch(0.9185 0.0257 285.8834);
  --card: oklch(0.2284 0.0384 282.9324);
  --card-foreground: oklch(0.9185 0.0257 285.8834);
  --primary: oklch(0.7162 0.1597 290.3962);
  --primary-foreground: oklch(0.1743 0.0227 283.7998);
  --secondary: oklch(0.3139 0.0736 283.4591);
  --secondary-foreground: oklch(0.8367 0.0849 285.9111);
  --accent: oklch(0.3354 0.0828 280.9705);
  --accent-foreground: oklch(0.9185 0.0257 285.8834);
  --muted: oklch(0.2710 0.0621 281.4377);
  --muted-foreground: oklch(0.7166 0.0462 285.1741);
  --border: oklch(0.3261 0.0597 282.5832);
  --destructive: oklch(0.6861 0.2061 14.9941);
  --ring: oklch(0.7162 0.1597 290.3962);
  --radius: 0.5rem;
  --font-sans: Inter, sans-serif;
  --font-serif: Georgia, serif;
  --font-mono: JetBrains Mono, monospace;
  --spacing: 0.25rem;
  --shadow: 0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
}
}