# palette

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

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

Farben mit ihren Rollen, und die Typografie. Wer Farben setzt, ersetzt alle.

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: { … } } }
```

## Rollen {#roles}

`primary` (höchstens eine), `secondary`, `accent`, `neutral`, `background`, `text`, `success`, `warning` und `error`.

## Typografie ist ein Name {#typography}

Die Schriftfamilien, die Ihre Oberflächen verwenden. Die Oberfläche, die eine Marke zeigt, behält ihre eigene Schrift: Die Schriften einer Marke werden beim Namen genannt, nicht geladen, um die Seite darzustellen.

- [Brand](/de/sdk/ref/brand-object): Was eine Marke enthält und wie man sie ändert.
- [logos](/de/sdk/ref/brand-object/logos): Ein Logo hinzufügen, das Hauptlogo wählen.

```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": {...}}}
```
