EmailPalette
Corex\Email\Design\EmailPalette · class · Add-ons layer
The colours an email is drawn in, for one colour scheme (spec 106, FR-012). This class holds literals, on purpose. Everywhere else in CoreX a colour is a custom property. An email cannot read one: mail clients do not support them, so a token has to arrive as a value somewhere. It arrives here, once, for every email CoreX sends, where spec 093 had it inside one add-on’s support message. light() and dark() are the CoreX admin’s two palettes, the values of plugins/corex-core/assets/css/corex-admin-tokens.css. A site that wants its own gives them through {@see with()}; a value that is not #rrggbb is refused, because it is written into a style attribute.
Public API
Section titled “Public API”__construct(string $canvas, string $surface, string $border, string $text, string $muted, string $accent, string $link)
Section titled “__construct(string $canvas, string $surface, string $border, string $text, string $muted, string $accent, string $link)”light(): self
Section titled “light(): self”dark(): self
Section titled “dark(): self”with(array $colours): self
Section titled “with(array $colours): self”This palette with some of its colours replaced.