A brand's theme
const url = 'http://localhost:3000/api/v1/brands/example/theme';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:3000/api/v1/brands/example/theme \ --header 'Authorization: Bearer <token>'How its pages look beyond what the rules say: which rule plays which part (accent, surface, ink, faces, logo) and the page’s measure, rhythm and chrome, with the look they give. Every ink is graded on its ground in checks: a pair under its need (4.5:1 for text, 3:1 for marks) falls back to a color that reads and is a warning. So is a setting whose rule has gone since, and the default is used.
Scope: read.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Brand slug
Responses
Section titled “Responses”The theme
object
object
Which rule plays which part, and the page’s measure, rhythm and chrome; left out: read from the rules
object
Hairline: the accent draws rules and marks, never fills
Corner radius in px
Heading size ratio; 1.25 when left out
Every page opens on a band of the brand color; header band says the same
A page’s opening: on the page, on a band of the brand color, or beside its cover
Between two sections on the page’s own ground: space alone, or a hairline too
Number chapters and pages: 01, 01.2
Subtle: sections reveal as they scroll in; never with reduced motion
On this page: a side column, a list under the page header, or hidden
Section titles: headings (medium), or headlines (large, huge); a section’s own size wins
Alternate: every other section on the page’s own ground sits on the panel, so a long page has rhythm; canvas: under its header the page sits on the panel, dotted like a whiteboard, its section titles centered
The languages readers pick from; the first is the one the pages are written in
object
From the language when left out
Links beside search and print on the brand’s pages: its repository, its Figma library, its site
object
Http or https; a link to GitHub, Figma, npm and the like shows its icon
The look the settings and rules give: grounds, inks, accent, faces and chrome
object
The accent, lifted for light and dark pages, and the faces, as before W3
object
A hex color
A hex color
A hex color
A hex color
A hex color
A hex color
The fill, as the brand has it: bands and buttons
The accent where it is text (links), at 4.5:1 on the surface
A hex color
A hex color
object
object
The font file for its weight
Every font file of the rule, one @font-face each
object
From Google Fonts, with no files here yet: set in its fallback until they are imported
object
The font file for its weight
Every font file of the rule, one @font-face each
object
From Google Fonts, with no files here yet: set in its fallback until they are imported
object
The font file for its weight
Every font file of the rule, one @font-face each
object
From Google Fonts, with no files here yet: set in its fallback until they are imported
In em
Header is band
On this page: a side column, a list under the page header, or none
Contrast of each pair in the look: one that fails falls back to a color that reads, and says which
object
Which color on which, e.g. ink on surface
The contrast it must reach: 4.5 for text, 3 for marks
The color used: fg when it passes, else its fallback
Contrast of each pair in the look: one that fails falls back to a color that reads, and says which
object
Which color on which, e.g. ink on surface
The contrast it must reach: 4.5 for text, 3 for marks
The color used: fg when it passes, else its fallback
Settings naming a rule that has gone since (the default is used), and each pair that fell back
Example
{ "data": { "settings": { "accentUse": "fill", "width": "narrow", "density": "compact", "nav": "sidebar", "header": "plain", "separation": "space", "motion": "none", "toc": "side", "titles": "medium", "grounds": "plain", "languages": [ { "dir": "ltr" } ] }, "theme": { "accentUse": "fill", "faces": { "head": { "google": true }, "body": { "google": true }, "label": { "google": true } }, "width": "narrow", "density": "compact", "nav": "sidebar", "header": "plain", "separation": "space", "motion": "none", "toc": "side" } }}default
Section titled “default”An error
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}