Theming

Glass Orbit uses CSS variables for full color customization. Create your own themes with a JSON config file.

Use your brand color

Set one variable after the Glass Orbit theme in your global CSS. Primary, focus ring, accent and the glass gradient are all derived from it, in light and dark mode. Try it on this page:

Badge
:root { --orbit-brand: #0090fe; }
/* globals.css, after the glass-orbit theme block */
:root {
  --orbit-brand: #e11d48;
}

Or put it in a theme file and apply it. The file can be this small:

// brand.json
{ "brand": "#e11d48" }

npx glass-orbit theme apply brand.json

Any single color can still be set on its own, for example --orbit-primary-foreground for text on the brand color, --orbit-overlay for the backdrop behind sheets, or --orbit-shadow for shadow color. Components use no fixed colors of their own.

Custom Themes

Create a JSON file with your theme definition:

{
  "name": "my-theme",
  "colors": {
    "background": "#0a0a0f",
    "foreground": "#fafafa",
    "primary": "#3087ed",
    "primary-foreground": "#ffffff",
    "border": "#1e1e3a",
    "ring": "#3087ed"
  },
  "gradient": {
    "gradient": "#3087ed",
    "gradient-highlight": "#3dc3fb",
    "gradient-shadow": "#015ecb",
    "gradient-opacity": 0.6,
    "glow-intensity": 0.3
  },
  "depth": {
    "highlight": "#ffffff",
    "highlight-opacity": 0.08,
    "inner-shadow": 0.3,
    "inner-gradient-direction": "to-bottom"
  },
  "radius": "0.75rem"
}

Gradient Settings

gradient — main gradient color used for the glass shine line

gradient-highlight — lighter version for reflections

gradient-shadow — darker version for depth and glow

gradient-opacity — visibility of the shine line (0-1)

glow-intensity — outer glow shadow strength (0-1)

Included Presets

Glass Orbit Dark
Cyan-blue on dark
Glass Orbit Light
Blue on white
Ocean Night
Teal on deep blue
Sunset Ember
Orange on warm dark
Emerald Dream
Emerald on dark green