Brand

palette

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

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

PUT /api/brand/:id/palette12 colorscontrast computed
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

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

الأدوار

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

الخط اسمٌ

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