# palette

Canonical URL: https://developers.iagenify.com/sdk/ref/brand-object/palette/
Language: en

`brand.palette.set(colors | { colors, typography }) · role(role) · colors · typography`

Colors with their roles, and the typography. Setting colors replaces them all.

Status: PUT /api/brand/:id/palette · 12 colors · contrast computed

```javascript
await brand.palette.set({
  colors: [{ hex: "#6B3E26", role: "primary", name: "Roast" }, { hex: "#D9A441", role: "accent" }],
  typography: { heading: "Fraunces", body: "Inter", mono: "" },
});

brand.palette.role("primary");
// { hex: "#6B3E26", role: "primary", name: "Roast", cmyk: [...], textColor: "#FFFFFF",
//   contrast: { onWhite: { ratio, level: "AA" }, onBlack: { … } } }
```

## Roles {#roles}

`primary` (one at most), `secondary`, `accent`, `neutral`, `background`, `text`, `success`, `warning` and `error`.

## Typography is a name {#typography}

The family names your surfaces will use. The interface that shows a brand keeps its own font: a brand's fonts are written by name, not loaded to render the page.

- [Brand](/sdk/ref/brand-object): What a brand carries, and how to change it.
- [logos](/sdk/ref/brand-object/logos): Adding a logo, choosing the main one.

```python
brand.palette.set({
    "colors": [{"hex": "#6B3E26", "role": "primary", "name": "Roast"}, {"hex": "#D9A441", "role": "accent"}],
    "typography": {"heading": "Fraunces", "body": "Inter", "mono": ""},
})

brand.palette.role("primary")
# {"hex": "#6B3E26", "role": "primary", "name": "Roast", "cmyk": [...], "textColor": "#FFFFFF",
#  "contrast": {"onWhite": {"ratio": ..., "level": "AA"}, "onBlack": {...}}}
```
