# palette

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

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

الألوان بأدوارها، والخطوط. تعيين الألوان يستبدلها كلها.

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}

`primary` (واحد على الأكثر)، و`secondary`، و`accent`، و`neutral`، و`background`، و`text`، و`success`، و`warning`، و`error`.

## الخط اسمٌ {#typography}

أسماء العائلات التي ستستخدمها واجهاتك. الواجهة التي تعرض العلامة التجارية تحتفظ بخطها الخاص: خطوط العلامة تُكتب بأسمائها، ولا تُحمَّل لعرض الصفحة.

- [Brand](/ar/sdk/ref/brand-object): ما تحمله العلامة التجارية، وكيف تعدّلها.
- [logos](/ar/sdk/ref/brand-object/logos): إضافة شعار، واختيار الشعار الرئيسي.

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