Brand Utilities
Overview
Brand assets and image helpers for DRC identity workflows.
Palette
Canonical brand colors are exposed in drcutils.brand.COLORS and named
constants:
Name |
Hex |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Logo Samples
Typography Guidance
Primary family:
Magdelin(headers, all caps).Secondary family:
Zilla Slab(body text).Use
get_matplotlib_font_fallbacks()for plotting-friendly fallback stacks.
Asset Resolver Examples
from drcutils.brand import (
get_circle_graphic_path,
get_gradient_paths,
get_logo_path,
get_pattern_path,
get_scribble_path,
)
symbol_white = get_logo_path("symbol", "white")
stacked_on_black = get_logo_path("stacked", "full", on_black=True)
pattern = get_pattern_path("grey")
gradients = get_gradient_paths()
circle = get_circle_graphic_path("blue")
scribble = get_scribble_path("thick", "dark_teal")
Watermark Example
from drcutils.brand import watermark
watermark(
"artifacts/figure.png",
output_filepath="artifacts/figure_watermarked.png",
logo_layout="stacked",
logo_variant="auto",
on_black="auto",
box=[0.02, 0.02, 0.12, None],
)
Variant Matrix
horizontallogo variants:full,black,dark_teal,red,white.stackedlogo variants:full,black,dark_teal,red,white.symbollogo variants:full,black,dark_teal,blue,teal,orange,red,white.on_black=Trueuses dedicated high-contrast logos forhorizontal,stacked, andsymbollayouts.
API Reference
Brand assets and image utilities for DRC visuals.
- drcutils.brand.BRAND_COLORS = {'black': '#000000', 'blue': '#57B7BA', 'dark_teal': '#1A4C49', 'orange': '#EA8534', 'red': '#DF5127', 'teal': '#4D8687'}
Semantic palette map for direct lookup in plotting and style code.
- drcutils.brand.COLORS = ['#000000', '#1A4C49', '#4D8687', '#57B7BA', '#EA8534', '#DF5127']
Canonical DRC palette in display order.
- drcutils.brand.COLOR_PATTERN_PNG = '/home/runner/work/drcutils/drcutils/src/drcutils/data/brand_assets/patterns/full.png'
Path to the full-color pattern PNG.
- drcutils.brand.GREY_PATTERN_PNG = '/home/runner/work/drcutils/drcutils/src/drcutils/data/brand_assets/patterns/grey.png'
Path to the grey pattern PNG.
- drcutils.brand.HORIZONTAL_LOGO_PNG = '/home/runner/work/drcutils/drcutils/src/drcutils/data/brand_assets/logos/horizontal/full.png'
Path to a PNG of the full-color horizontal logo.
- drcutils.brand.LOGO_ONLY_PNG = '/home/runner/work/drcutils/drcutils/src/drcutils/data/brand_assets/logos/symbol/full.png'
Path to a PNG of the full-color symbol logo.
- drcutils.brand.LOGO_ONLY_STL = '/home/runner/work/drcutils/drcutils/src/drcutils/data/logo.stl'
Path to an STL of the symbol logo.
- drcutils.brand.LOGO_ONLY_SVG = '/home/runner/work/drcutils/drcutils/src/drcutils/data/logo.svg'
Path to an SVG of the symbol logo.
- drcutils.brand.STACKED_LOGO_PNG = '/home/runner/work/drcutils/drcutils/src/drcutils/data/brand_assets/logos/stacked/full.png'
Path to a PNG of the full-color stacked logo.
- drcutils.brand.WHITE_PATTERN_PNG = '/home/runner/work/drcutils/drcutils/src/drcutils/data/brand_assets/patterns/white.png'
Path to the white pattern PNG.
- drcutils.brand.get_circle_graphic_path(color)[source]
Resolve the canonical path for a packaged circle graphic.
- drcutils.brand.get_logo_path(layout, variant, on_black=False, fmt='png')[source]
Resolve the canonical path for a packaged logo variant.
- drcutils.brand.get_matplotlib_font_fallbacks()[source]
Return recommended Matplotlib font fallback stacks.
- drcutils.brand.get_pattern_path(variant)[source]
Resolve the canonical path for packaged pattern imagery.