recon_gen.common.theme
QuickSight theme — registry default + builder.
Per N.1.g, the registry holds ONLY the default preset (a neutral
blue/grey professional palette). Per-instance brand palettes
(formerly sasquatch-bank, sasquatch-bank-investigation) moved
to inline theme: blocks on the L2 YAML — apps consume the L2
theme via resolve_l2_theme(l2_instance).
The ThemePreset dataclass itself lives in common/l2/theme.py
— theme is an L2 model concept; this module re-exports for back-compat
and provides the build_theme(cfg) QuickSight Theme constructor.
Functions
|
Build the QuickSight Theme resource for |
|
Pick the theme to render with for an L2-fed app (N.1 / N.4.k). |
- class recon_gen.common.theme.ThemePreset(theme_name, version_description, analysis_name_prefix, data_colors, empty_fill_color, gradient, primary_bg, secondary_bg, primary_fg, secondary_fg, accent, accent_fg, link_tint, danger, danger_fg, warning, warning_fg, success, success_fg, dimension, dimension_fg, measure, measure_fg, logo=None, favicon=None)[source]
Bases:
objectEverything that varies between theme variants.
- Parameters:
theme_name (str)
version_description (str)
analysis_name_prefix (str | None)
data_colors (list[str])
empty_fill_color (str)
gradient (list[str])
primary_bg (str)
secondary_bg (str)
primary_fg (str)
secondary_fg (str)
accent (str)
accent_fg (str)
link_tint (str)
danger (str)
danger_fg (str)
warning (str)
warning_fg (str)
success (str)
success_fg (str)
dimension (str)
dimension_fg (str)
measure (str)
measure_fg (str)
logo (str | None)
favicon (str | None)
- accent: str
- accent_fg: str
- analysis_name_prefix: str | None
- danger: str
- danger_fg: str
- data_colors: list[str]
- dimension: str
- dimension_fg: str
- empty_fill_color: str
- favicon: str | None
- gradient: list[str]
- link_tint: str
- logo: str | None
- measure: str
- measure_fg: str
- primary_bg: str
- primary_fg: str
- secondary_bg: str
- secondary_fg: str
- success: str
- success_fg: str
- theme_name: str
- version_description: str
- warning: str
- warning_fg: str
- recon_gen.common.theme.build_theme(cfg, theme)[source]
Build the QuickSight Theme resource for
theme(N.4.k).Returns
NonewhenthemeisNone— the silent-fallback contract: an L2 instance with no inlinetheme:block deploys against AWS QuickSight’s CLASSIC theme without emitting a custom Theme resource. The CLI skipstheme.jsonwrite + skips the deploy step in that case.When
themeis set, builds a complete Theme honoring permissions + tags fromcfg.- Return type:
Theme|None- Parameters:
cfg (Config)
theme (ThemePreset | None)
- recon_gen.common.theme.resolve_l2_theme(l2_instance)[source]
Pick the theme to render with for an L2-fed app (N.1 / N.4.k).
Returns the L2 instance’s inline theme block when present (the N.1 path);
Noneotherwise — the silent-fallback contract (N.4.k). Callers that consume the return for accent colors (e.g., Getting Started rich text) should fall through toDEFAULT_PRESET.accentso on-canvas colors stay sensible when no L2 theme is declared. The dashboard-level fallback is AWS QuickSight’s CLASSIC theme (no Theme resource emitted bybuild_themewhenNone).- Return type:
ThemePreset|None- Parameters:
l2_instance (L2Instance | None)