common_reports.contracts.builders.brand
Brand — who a report is from: wordmark, crest, palette and type.
A renderer style that draws a masthead and footer (EmailRenderer(style= "modern")) takes one Brand. Brand() is the neutral, unbranded look;
NULL_CAPITAL carries the Null Capital crest and palette; any other house
passes its own Brand(name=..., logo=..., accent=...).
Logos are held once, as package data, and read only when a renderer draws them
(logo is bytes or anything with read_bytes()).
Classes
Brand
Frozen brand identity. Colours are hex; dark_* apply in dark mode
where the mail client supports it.
__init__
def __init__(name: str | None = None, tagline: str | None = None, url: str | None = None, logo: Any = None, logo_dark: Any = None, footer: str | None = None, ink: str = '#1b1d21', paper: str = '#ffffff', muted: str = '#5d6169', hair: str = '#e3e5e8', accent: str = '#1f4e79', canvas: str = '#f1f2f4', positive: str = '#2f7a3b', negative: str = '#b3261e', dark_ink: str = '#e8e9eb', dark_paper: str = '#1c1e22', dark_muted: str = '#a1a5ad', dark_hair: str = '#34373d', dark_accent: str = '#7fb0dd', dark_canvas: str = '#131417', dark_positive: str = '#6fbf73', dark_negative: str = '#ef7a6f', font: str = "'Helvetica Neue',Helvetica,Arial,sans-serif", mono: str = 'ui-monospace,Menlo,Consolas,monospace', warning: str = '#b7791f', series: tuple[str, ...] = ('#1f4e79', '#1b1d21', '#2f7a3b', '#c9a227', '#6a1b9a', '#5d6169'), chart_card: bool = True, chart_text: str = '#8b8880', chart_mark: bool = False) -> NoneFields and properties declared here; inherited members belong to the bases above.
accent
accent: str = '#1f4e79'canvas
canvas: str = '#f1f2f4'chart_card
chart_card: bool = Truechart_mark
chart_mark: bool = Falsechart_text
chart_text: str = '#8b8880'dark_accent
dark_accent: str = '#7fb0dd'dark_canvas
dark_canvas: str = '#131417'dark_hair
dark_hair: str = '#34373d'dark_ink
dark_ink: str = '#e8e9eb'dark_muted
dark_muted: str = '#a1a5ad'dark_negative
dark_negative: str = '#ef7a6f'dark_paper
dark_paper: str = '#1c1e22'dark_positive
dark_positive: str = '#6fbf73'font
font: str = "'Helvetica Neue',Helvetica,Arial,sans-serif"footer
footer: str | None = Nonehair
hair: str = '#e3e5e8'ink
ink: str = '#1b1d21'logo
logo: Any = Nonelogo_dark
logo_dark: Any = Nonemono
mono: str = 'ui-monospace,Menlo,Consolas,monospace'muted
muted: str = '#5d6169'name
name: str | None = Nonenegative
negative: str = '#b3261e'paper
paper: str = '#ffffff'positive
positive: str = '#2f7a3b'series
series: tuple[str, ...] = ('#1f4e79', '#1b1d21', '#2f7a3b', '#c9a227', '#6a1b9a', '#5d6169')tagline
tagline: str | None = Noneurl
url: str | None = Nonewarning
warning: str = '#b7791f'logo_bytes
def logo_bytes(*, dark: bool = False) -> bytes | NoneThe logo’s PNG bytes (dark picks logo_dark), or None.
Types and values
NULL_CAPITAL
NULL_CAPITAL = Brand(name='Null Capital', tagline='An AI-Native, data-driven, Quantitative Investment Platform.', logo=(_ASSETS / 'crest-light.png'), logo_dark=(_ASSETS / 'crest-dark.png'), series=('#3a78c2', '#1b1d21', '#3f8f4a', '#c9a227', '#8e5bb5', '#8a8f98'), chart_card=False, chart_text='#8a8f98', chart_mark=True)