Skip to content

RapiDoc ships six themes. Each one defines an accent and, where the theme tints its surfaces, a background and foreground for both color schemes; every other color (cards, muted text, borders, inputs) is derived from those, so a theme looks consistent in color-scheme="dark", "light" and "system".

Theme Accent (dark / light) Dark surface Character
ember #f76b39 / #f76b39 Neutral charcoal #1f1f23 Warm, high-energy
carbon #fafafa / #18181b Near-black #121214 Monochrome, terminal-like
cobalt #7aa2d6 / #3a6cb0 Grey-blue slate #1e2530, cards #181e27 Matte, understated developer portal
jade #00d390 / #047857 Slate-navy #1d232a, cards #181e25 Payments, banking, infrastructure
indigo #818cf8 / #4f46e5 Indigo-black #0f0e1c SaaS and platform products
amber (default) #f6a821 / #ff791a Slate grey #30333c, cards #383b43, sidebar #2c2d35 High contrast, dashboard-like

Light mode uses a white background in every theme; the tinted themes carry their hue into the text, cards and borders.

Try them side by side on the Themes example.


Orange-red accent over neutral charcoal. This is what you get without a theme attribute.

<rapi-doc spec-url="https://rapidocui.com/specs/petstore.yaml" theme="ember" color-scheme="dark"></rapi-doc>

Monochrome. Near-black surfaces with a white accent in dark mode; black on white in light mode. Pairs well with radius="none".

<rapi-doc spec-url="https://rapidocui.com/specs/petstore.yaml" theme="carbon" color-scheme="dark" radius="none"></rapi-doc>

Matte steel-blue accent over grey-blue slate, with cards a shade darker than the page; muted blue accent and slate text in light mode.

<rapi-doc spec-url="https://rapidocui.com/specs/petstore.yaml" theme="cobalt" color-scheme="dark" radius="md"></rapi-doc>

Green accent over slate-navy surfaces, with cards and code a shade darker than the page (the daisyUI look); deep green text in light mode.

<rapi-doc spec-url="https://rapidocui.com/specs/petstore.yaml" theme="jade" color-scheme="dark"></rapi-doc>

Indigo accent over indigo-black surfaces; navy-violet text in light mode.

<rapi-doc spec-url="https://rapidocui.com/specs/petstore.yaml" theme="indigo" color-scheme="dark" radius="lg"></rapi-doc>

Amber accent over slate grey, with lighter cards, a darker sidebar and white headings: the brightest accent of the presets, for a high-contrast look. In light mode the accent is the orange #ff791a.

<rapi-doc spec-url="https://rapidocui.com/specs/petstore.yaml" theme="amber" color-scheme="dark" radius="md"></rapi-doc>

Pass a hex code as the theme. RapiDoc sets --primary and --ring to it and picks black or white for --primary-foreground by luminance, over neutral charcoal surfaces (as Ember).

<rapi-doc spec-url="https://rapidocui.com/specs/petstore.yaml" theme="#2563eb" color-scheme="dark" radius="md"></rapi-doc>

To change more than the accent, set the CSS variables on the element; see Theming Overview.

rapi-doc {
--background: #0b1220;
--foreground: #e2e8f0;
}

color-scheme="system" switches between the theme’s dark and light palette with the OS preference. color-scheme="auto" follows the host page’s CSS color-scheme instead (as set, for example, by a site’s own light/dark switch), and falls back to the OS preference.

<rapi-doc spec-url="https://rapidocui.com/specs/petstore.yaml" theme="jade" color-scheme="system"></rapi-doc>