await brand.logos.add({ name: "mark.svg", content: svgText, role: "icon" });
await brand.logos.setMain(brand.logos.find((l) => l.role === "icon").id);
await brand.logos.update(logoId, { role: "monogram" });
await brand.logos.remove(logoId);
brand.logos.main; // { id, name, role, format, width, height, url, main: true }brand.logos.add({"name": "mark.svg", "content": svg_text, "role": "icon"})
icon = next(logo for logo in brand.logos if logo["role"] == "icon")
brand.logos.set_main(icon["id"])
brand.logos.update(logo_id, role="monogram")
brand.logos.remove(logo_id)
brand.logos.main # {"id", "name", "role", "format", "width", "height", "url", "main": True}Un único logotipo principal
El primer logotipo pasa a ser el principal. Quitarlo pasa el rol al siguiente; setMain() lo mueve. Sin paleta, los colores se extraen del logotipo principal.
Roles
primary, secondary, icon, monogram u other. Un rol dice cómo se usa un logotipo, no cómo se ve.