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:

DRC color swatches for black, dark teal, teal, blue, orange, and red.

Name

Hex

BLACK

#000000

DARK_TEAL

#1A4C49

TEAL

#4D8687

BLUE

#57B7BA

ORANGE

#EA8534

RED

#DF5127

Logo Samples

DRC horizontal full-color logo. DRC stacked full-color logo. DRC symbol full-color logo. DRC horizontal on-black-only logo rendered on a dark background.

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

  • horizontal logo variants: full, black, dark_teal, red, white.

  • stacked logo variants: full, black, dark_teal, red, white.

  • symbol logo variants: full, black, dark_teal, blue, teal, orange, red, white.

  • on_black=True uses dedicated high-contrast logos for horizontal, stacked, and symbol layouts.

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.flag(output_filepath=None, size=None)[source]

Create a DRC color flag image.

drcutils.brand.get_circle_graphic_path(color)[source]

Resolve the canonical path for a packaged circle graphic.

drcutils.brand.get_gradient_paths()[source]

Return ordered packaged gradient asset paths.

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.

drcutils.brand.get_scribble_path(weight, color)[source]

Resolve the canonical path for a packaged scribble graphic.

drcutils.brand.watermark(filepath, output_filepath=None, watermark_filepath=None, box=None, *, logo_layout='stacked', logo_variant='auto', on_black='auto')[source]

Watermark an image using packaged DRC assets or a custom watermark file.