The reference
Sunlit
Mediterranean craft: a peach page, terracotta and sun, Fraunces, rounded and soft.
Every preview on the site now wears Sunlit.
On real blocks
The same markup as every other theme; only the stylesheet changes. The Customize button in the toolbar tries the decisions below on it.
Its decisions
What Sunlit was generated from. Everything else — every ramp, every role, light and dark, every mood — is unfolded from these, and every text pair is checked for contrast.
- Brand
- #b34530
- the colour every brand role is built from
- Accent
- #e8a33d
- the second colour, for highlights
- Palette
- peach #fbeadf
- the other colours the roles are assigned from
- Roles
- background peach · sidebar peach · card peach.raised · popover peach.raised · muted peach.tint · secondary peach.tint · accent peach.tint
- which colour each surface and fill takes
- Primary action
- brand
- ink buttons, or buttons in the brand colour
- Neutral
- #f0c9ae · tinted
- the greys: their temperature, and how much of it they carry
- Page
- peach
- the page itself: white, or a palette colour
- Opens in
- light
- the mode a site opens in
- Bands
- strong · alt
- the named bands a page can call (mood-* classes)
- Fonts
- Fraunces · DM Sans
- headings · body
- Headings
- editorial · 400
- the scale and weight of the titles
- Radius
- rounded
- how round the corners are
- Buttons
- pill
- the button, the one exception to the radius
- Depth
- soft
- the shadows of cards and overlays (offset: a sharp poster shadow)
- Lines
- hairline
- the borders: fine or full strength, and their colour
- Button style
- solid
- solid, outline, soft or hard
- Fields
- filled
- outlined, filled or underlined
- Density
- regular
- the spacing of the whole interface
- Section spacing
- airy
- the vertical rhythm between sections
- Page width
- regular
- the page’s width and reading measure
- Motion
- calm
- the character of transitions and reveals
Colours
The roles every component and block reads, light and dark.
--background
oklch(0.9476 0.0237 55.26) · oklch(0.2596 0.0235 55.13)
--foreground
oklch(0.2095 0.0099 52.92) · oklch(0.9729 0.0076 61.45)
--card
oklch(0.9678 0.0151 54.93) · oklch(0.3709 0.0236 56.59)
--muted
oklch(0.9476 0.0237 55.26) · oklch(0.3328 0.0233 53.3)
--muted-foreground
oklch(0.4898 0.01 56.15) · oklch(0.7663 0.0349 56.99)
--border
oklch(0.2095 0.0099 52.92 / 0.1412) · oklch(0.9729 0.0076 61.45 / 0.1216)
--primary
oklch(0.5365 0.1478 32.77) · oklch(0.6605 0.113 32.62)
--primary-foreground
oklch(1 0 0) · oklch(0.1723 0.0091 58.99)
--brand
oklch(0.5365 0.1478 32.77) · oklch(0.5365 0.1478 32.77)
--brand-soft
oklch(0.9634 0.0141 39.42) · oklch(0.2603 0.0429 33.86)
--brand-text
oklch(0.5365 0.1478 32.77) · oklch(0.8442 0.0488 32.48)
--success
oklch(0.624 0.1269 158.51) · oklch(0.624 0.1269 158.51)
--warning
oklch(0.789 0.1413 86.31) · oklch(0.789 0.1413 86.31)
--destructive
oklch(0.5487 0.1792 27.9) · oklch(0.7784 0.0841 23.73)
--info
oklch(0.5569 0.1719 259.46) · oklch(0.7009 0.1314 260.97)
Every variable
Light
| --background | oklch(0.9476 0.0237 55.26) | |
| --foreground | oklch(0.2095 0.0099 52.92) | |
| --card | oklch(0.9678 0.0151 54.93) | |
| --muted | oklch(0.9476 0.0237 55.26) | |
| --muted-foreground | oklch(0.4898 0.01 56.15) | |
| --border | oklch(0.2095 0.0099 52.92 / | |
| --primary | oklch(0.5365 0.1478 32.77) | |
| --primary-foreground | oklch(1 0 0) | |
| --secondary | oklch(0.9174 0.0239 55.25) | |
| --accent | oklch(0.9174 0.0239 55.25) | |
| --brand | oklch(0.5365 0.1478 32.77) | |
| --brand-foreground | oklch(1 0 0) | |
| --brand-soft | oklch(0.9634 0.0141 39.42) | |
| --brand-text | oklch(0.5365 0.1478 32.77) | |
| --ring | oklch(0.8442 0.0488 32.48) | |
| --success | oklch(0.624 0.1269 158.51) | |
| --warning | oklch(0.789 0.1413 86.31) | |
| --destructive | oklch(0.5487 0.1792 27.9) | |
| --info | oklch(0.5569 0.1719 259.46) |
Dark
| --background | oklch(0.2596 0.0235 55.13) | |
| --foreground | oklch(0.9729 0.0076 61.45) | |
| --card | oklch(0.3709 0.0236 56.59) | |
| --muted | oklch(0.3328 0.0233 53.3) | |
| --muted-foreground | oklch(0.7663 0.0349 56.99) | |
| --border | oklch(0.9729 0.0076 61.45 / | |
| --primary | oklch(0.6605 0.113 32.62) | |
| --primary-foreground | oklch(0.1723 0.0091 58.99) | |
| --secondary | oklch(0.3328 0.0233 53.3) | |
| --accent | oklch(0.3328 0.0233 53.3) | |
| --brand-soft | oklch(0.2603 0.0429 33.86) | |
| --brand-text | oklch(0.8442 0.0488 32.48) | |
| --ring | oklch(0.5365 0.1478 32.77) | |
| --destructive | oklch(0.7784 0.0841 23.73) | |
| --info | oklch(0.7009 0.1314 260.97) |
brand
accent
neutral
Type
Fraunces for headings, DM Sans for the text.
Headings · Fraunces
The quick brown fox jumps over the lazy dog
Text · DM Sans
Every theme is a stylesheet. The markup never changes: the same blocks, the same components, and the decisions you make decide how they read — the corners, the depth, the colours and these words.
const theme = 'sunlit' // and its code
Shape and depth
Its corners, from the smallest control to a panel, and its shadows, from a card at rest to an overlay.
Control corner
resting shadow
Field corner
lifted, on hover
Card corner
a popover
Panel corner
a dialog
Use it
Its stylesheet
After Tailwind, in your global CSS.
@import '@trame-ui/themes/themes/sunlit/css/tokens.css';
@import '@trame-ui/themes/themes/sunlit/css/theme-light.css';
@import '@trame-ui/themes/themes/sunlit/css/theme-dark.css';
@import '@trame-ui/themes/themes/sunlit/css/theme-moods.css';
@import '@trame-ui/themes/themes/sunlit/css/type.css';
@import '@trame-ui/themes/themes/sunlit/css/controls.css';
@import '@trame-ui/themes/themes/sunlit/css/motion.css';Or make it yours
Change a decision in its intent and generate the theme: every ramp, role and contrast check follows.
{
"name": "sunlit",
"label": "Sunlit",
"description": "Mediterranean craft: a peach page, terracotta and sun, Fraunces, rounded and soft.",
"primary": "brand",
"palette": {
"brand": "#b34530",
"accent": "#e8a33d",
"peach": "#fbeadf"
},
"neutral": {
"temperature": "#f0c9ae",
"chroma": "tinted"
},
"roles": {
"background": "peach",
"sidebar": "peach",
"card": "peach.raised",
"popover": "peach.raised",
"muted": "peach.tint",
"secondary": "peach.tint",
"accent": "peach.tint"
},
"schemes": {
"strong": "#8f3424",
"alt": "#f2c14e"
},
"fonts": {
"heading": "Fraunces",
"body": "DM Sans"
},
"headings": {
"scale": "editorial",
"weight": 400,
"tracking": "-0.02em"
},
"radius": "rounded",
"shape": "pill",
"depth": {
"recipe": "soft"
},
"lines": {
"style": "hairline"
},
"button": "solid",
"hover": "lift",
"field": "filled",
"density": "regular",
"sectionSpacing": "airy",
"container": "regular",
"motion": "calm",
"nav": {
"recipe": "dot",
"current": "brand"
}
}node node_modules/@trame-ui/tokens/src/generate.mjs intent.json --out=themes