Skip to content

Commit 678de7b

Browse files
committed
Expand text
1 parent 605ec6e commit 678de7b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

docs/authoring/brand.qmd

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,16 +451,21 @@ $navbar-bg: $brand-blue;
451451

452452
### Typst
453453

454-
Brand colors are available in `brand-color`:
454+
In Typst documents, brand colors are set in a [dictionary](https://typst.app/docs/reference/foundations/dictionary/) called `brand-color`.
455+
You can access them directory in raw Typst blocks using the syntax `brand-color.COLOR_NAME`.
456+
For example, you could make a rectangle filled with your `primary` brand color:
457+
458+
````{.markdown filename="document.qmd"}
455459

456-
````markdown
457460
```{=typst}
458-
#set text(fill: brand-color.primary)
461+
#rect(fill: brand-color.primary)
459462
```
460463
````
461464

462465
### Lua API
463466

467+
Filters and shortcodes can access brand values using the `brand` Lua module.
468+
464469
``` lua
465470
local brand = require('modules/brand/brand')
466471
local primary = brand.get_color('primary')

0 commit comments

Comments
 (0)