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。
字体是一个名称
你的各个界面将使用的字体族名称。展示品牌的界面保留自己的字体:品牌的字体以名称记录,不会为渲染页面而加载。