Links
AI / Agents
gdtest-accent-color
A package demonstrating the accent_color config option
Installation
pip install gdtest-accent-colorGet Started
- API Reference — Full API documentation
- User Guide — Guides and tutorials
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