#290
gdtest_accent_color
OK
CONFIG
Site-wide accent_color config with hr shortcode integration
Site-wide accent_color config option that sets --gd-accent via great-docs.yml. Uses a distinctive teal (#0d9488) to verify the accent propagates to default hr shortcodes, gradient presets, and text dividers while palette colors (sky, peach, etc.) retain their own hues. Tests light and dark mode handling.
Build Mode
● Has great-docs.yml
This package ships a pre-supplied config.
The great-docs init step is skipped and
great-docs build uses the spec-defined configuration directly.
Tests specific config options and their rendered output.
Dimensions
A1 B1 C4 D2 E6 F1 G1 H7
A1Flat layoutlayout
B1Explicit __all__exports
C4Mixed class+funcobjects
D2Googledocstrings
E6No directivesdirectives
F1Auto-discoveruser_guide
G1README.mdlanding
H7No extrasextras
Source Files
gdtest_accent_color/
__init__.py
"""Accent color demo package."""
__version__ = "1.0.0"
__all__ = ["highlight", "summarize"]
def highlight(text: str) -> str:
"""Highlight important text.
Parameters
----------
text
The text to highlight.
Returns
-------
str
Highlighted text.
"""
return f"**{text}**"
def summarize(items: list) -> str:
"""Summarize a list of items.
Parameters
----------
items
Items to summarize.
Returns
-------
str
A summary string.
"""
return f"{len(items)} items"user_guide/
01-string-accent.qmd
---
title: String Accent Color
---
# Single Accent Color
This site uses `accent_color: '#0d9488'` (teal) in the config.
Every element that references `--gd-accent` should appear teal.
## Default HR
A plain `{{< hr >}}` with no color override should be teal:
{{< hr >}}
## HR with Accent Keyword
{{< hr color="accent" >}}
## Gradient Shimmer
The shimmer should use the teal accent in its gradient:
{{< hr preset="gradient-shimmer" >}}
## Gradient Static
{{< hr preset="gradient-static" >}}
## Fade
{{< hr preset="fade" >}}
## HR Styles
These should all be teal by default:
{{< hr style="solid" >}}
{{< hr style="dashed" >}}
{{< hr style="dotted" >}}
{{< hr style="double" >}}
## Thick HR
{{< hr thickness="thick" >}}
## HR with Text
{{< hr text="Teal Accent" >}}
## Explicit Color Override
This one explicitly sets red, so the accent should NOT apply:
{{< hr color="#e11d48" >}}02-per-mode-accent.qmd
---
title: Per-Mode Accent Colors
---
# Light / Dark Accent Colors
This page tests that the accent color config can accept a dict
with `light` and `dark` keys. The site config for this package
uses a single string, so both modes get the same teal.
Toggle dark mode to verify the color persists in both themes.
## Default HR in Each Mode
{{< hr >}}
## Ornament Preset
{{< hr preset="ornament" >}}
## Diamond Preset
{{< hr preset="diamond" >}}
## Dots Preset
{{< hr preset="dots" >}}
## Text with Size Variants
{{< hr text="Small" text-size="sm" >}}
{{< hr text="Default" >}}
{{< hr text="Large" text-size="lg" >}}03-palette-vs-accent.qmd
---
title: Palette vs Accent
---
# Palette Colors vs Accent
Named palette colors should use their own hue, not the accent.
Only a plain `{{< hr >}}` or `color='accent'` should use the
site accent.
## Accent (should be teal)
{{< hr >}}
{{< hr color="accent" >}}
## Sky (should be blue, NOT teal)
{{< hr color="sky" >}}
## Peach (should be orange, NOT teal)
{{< hr color="peach" >}}
## Honey (should be amber, NOT teal)
{{< hr color="honey" >}}
## Lilac (should be purple, NOT teal)
{{< hr color="lilac" >}}
## Mint (should be mint, similar to teal but distinct token)
{{< hr color="mint" >}}
## Custom Red (should be red, NOT teal)
{{< hr color="#e11d48" >}}great-docs.yml
accent_color: "#0d9488" dark_mode: true