Skip to content

Commit e220538

Browse files
paddymulclaude
andcommitted
style: use garish colors in MultiIndex demo for clarity
Each theme property gets a distinct loud color so readers can see exactly which key targets which piece of the grid. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5ac1b75 commit e220538

2 files changed

Lines changed: 23 additions & 19 deletions

File tree

docs/source/articles/theme-customization.rst

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -539,23 +539,27 @@ and ``groupby().agg()``. Three theme properties target the header area:
539539
], names=['Category', 'Detail'])
540540
df = pd.DataFrame(..., columns=cols)
541541
542-
# The theme
542+
Every property below uses a deliberately garish color so you can see
543+
exactly what it controls:
544+
545+
.. code-block:: python
546+
543547
component_config = {'theme': {
544548
'colorScheme': 'dark',
545-
'accentColor': '#26c6da',
546-
'accentHoverColor': '#00acc1',
547-
'backgroundColor': '#0d1117',
548-
'foregroundColor': '#c9d1d9',
549-
'oddRowBackgroundColor': '#161b22',
550-
'borderColor': '#30363d',
551-
'headerBorderColor': '#58a6ff',
552-
'headerBackgroundColor': '#161b22',
549+
'accentColor': '#ff00ff', # purple — column selection highlight
550+
'accentHoverColor': '#ff6600', # orange — hover state
551+
'backgroundColor': '#0000cc', # blue — main table background
552+
'foregroundColor': '#00ffcc', # teal — text color
553+
'oddRowBackgroundColor': '#cc0000', # red — alternating row stripe
554+
'borderColor': '#ff69b4', # pink — ALL grid borders
555+
'headerBorderColor': '#00ff00', # green — column header dividers only
556+
'headerBackgroundColor': '#8b4513', # brown — header row background
553557
}}
554558
555559
.. raw:: html
556560

557561
<iframe src="../themes/multiindex-headers.html"
558-
style="width:100%; height:360px; border:1px solid #30363d; border-radius:4px; margin:1em 0;">
562+
style="width:100%; height:360px; border:1px solid #ff69b4; border-radius:4px; margin:1em 0;">
559563
</iframe>
560564

561565

scripts/generate_theme_static_html.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -323,16 +323,16 @@ def themed_html(df, title, theme_config):
323323
"MultiIndex Headers",
324324
{
325325
"colorScheme": "dark",
326-
"accentColor": "#26c6da",
327-
"accentHoverColor": "#00acc1",
328-
"backgroundColor": "#0d1117",
329-
"foregroundColor": "#c9d1d9",
330-
"oddRowBackgroundColor": "#161b22",
331-
"borderColor": "#30363d",
332-
"headerBorderColor": "#58a6ff",
333-
"headerBackgroundColor": "#161b22",
326+
"accentColor": "#ff00ff", # purple/magenta — column selection
327+
"accentHoverColor": "#ff6600", # orange — hover state
328+
"backgroundColor": "#0000cc", # blue — main table background
329+
"foregroundColor": "#00ffcc", # teal — text color
330+
"oddRowBackgroundColor": "#cc0000", # red — alternating row stripe
331+
"borderColor": "#ff69b4", # pink — all grid borders
332+
"headerBorderColor": "#00ff00", # green — column header dividers
333+
"headerBackgroundColor": "#8b4513", # brown — header row background
334334
},
335-
"MultiIndex column headers with styled group separators. borderColor controls all grid borders including header separators; headerBorderColor targets column dividers; headerBackgroundColor colors the header rows.",
335+
"Garish colors so you can see exactly which property targets which piece.",
336336
"multiindex",
337337
),
338338
]

0 commit comments

Comments
 (0)