great-tables-3-styling-and-colors

Sub-skill of great-tables: 3. Styling and Colors.

5 stars

Best use case

great-tables-3-styling-and-colors is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of great-tables: 3. Styling and Colors.

Teams using great-tables-3-styling-and-colors should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/3-styling-and-colors/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_archive/data/analysis/great-tables/3-styling-and-colors/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/3-styling-and-colors/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How great-tables-3-styling-and-colors Compares

Feature / Agentgreat-tables-3-styling-and-colorsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sub-skill of great-tables: 3. Styling and Colors.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 3. Styling and Colors

## 3. Styling and Colors


**Background Colors:**
```python
from great_tables import GT
from great_tables import style, loc
import pandas as pd

df = pd.DataFrame({
    "Category": ["Electronics", "Clothing", "Food", "Home"],
    "Q1": [150000, 95000, 120000, 85000],
    "Q2": [180000, 88000, 135000, 92000],
    "Q3": [165000, 102000, 128000, 78000],
    "Q4": [210000, 115000, 145000, 105000]
})

table = (
    GT(df)
    .tab_header(title="Quarterly Sales by Category")

    # Style header row
    .tab_style(
        style=style.fill(color="#4a86e8"),
        locations=loc.column_labels()
    )
    .tab_style(
        style=style.text(color="white", weight="bold"),
        locations=loc.column_labels()
    )

    # Alternate row colors
    .tab_style(
        style=style.fill(color="#f3f3f3"),
        locations=loc.body(rows=[1, 3])  # Even rows
    )

    # Highlight specific cell
    .tab_style(
        style=style.fill(color="#90EE90"),
        locations=loc.body(columns="Q4", rows=[0])  # Highest Q4
    )
)

table.save("styled_table.html")
```

**Text Styling:**
```python
from great_tables import GT
from great_tables import style, loc
import pandas as pd

df = pd.DataFrame({
    "Rank": [1, 2, 3, 4, 5],
    "Company": ["TechCorp", "DataInc", "CloudSoft", "AILabs", "DevHub"],
    "Revenue_B": [125.4, 98.2, 87.5, 76.3, 65.8],
    "Change": [0.15, 0.08, -0.03, 0.22, -0.12]
})

table = (
    GT(df)
    .tab_header(title="Top Companies by Revenue")

    # Bold first column
    .tab_style(
        style=style.text(weight="bold"),
        locations=loc.body(columns="Rank")
    )

    # Italic company names
    .tab_style(
        style=style.text(style="italic"),
        locations=loc.body(columns="Company")
    )

    # Color positive/negative changes
    .tab_style(
        style=style.text(color="green"),
        locations=loc.body(columns="Change", rows=[0, 1, 3])  # Positive
    )
    .tab_style(
        style=style.text(color="red"),
        locations=loc.body(columns="Change", rows=[2, 4])  # Negative
    )

    # Format numbers
    .fmt_currency(columns="Revenue_B", currency="USD", decimals=1)
    .fmt_percent(columns="Change", decimals=1)
)

table.save("text_styled.html")
```

**Borders and Spacing:**
```python
from great_tables import GT
from great_tables import style, loc
import pandas as pd

df = pd.DataFrame({
    "Section": ["Introduction", "Methods", "Results", "Discussion"],
    "Pages": [5, 12, 18, 8],
    "Figures": [2, 6, 15, 3],
    "Tables": [0, 3, 8, 1]
})

table = (
    GT(df)
    .tab_header(title="Manuscript Structure")

    # Add border below header
    .tab_style(
        style=style.borders(sides="bottom", color="black", weight="2px"),
        locations=loc.column_labels()
    )

    # Add border below last row
    .tab_style(
        style=style.borders(sides="bottom", color="black", weight="2px"),
        locations=loc.body(rows=[-1])
    )

    # Cell padding
    .tab_options(
        data_row_padding="10px",
        column_labels_padding="12px"
    )
)

table.save("bordered_table.html")
```

Related Skills

doc-extraction-naval-architecture-structural-scantling-tables

5
from vamseeachanta/workspace-hub

Sub-skill of doc-extraction-naval-architecture: Structural Scantling Tables.

chartjs-custom-colors

5
from vamseeachanta/workspace-hub

Sub-skill of chartjs: Custom Colors (+2).

great-tables-great-tables-with-streamlit

5
from vamseeachanta/workspace-hub

Sub-skill of great-tables: Great Tables with Streamlit (+1).

great-tables-6-footnotes-and-annotations

5
from vamseeachanta/workspace-hub

Sub-skill of great-tables: 6. Footnotes and Annotations (+1).

great-tables-5-grouped-rows-and-columns

5
from vamseeachanta/workspace-hub

Sub-skill of great-tables: 5. Grouped Rows and Columns.

great-tables-4-conditional-formatting

5
from vamseeachanta/workspace-hub

Sub-skill of great-tables: 4. Conditional Formatting.

great-tables-1-keep-tables-focused

5
from vamseeachanta/workspace-hub

Sub-skill of great-tables: 1. Keep Tables Focused (+3).

great-tables-1-basic-table-creation

5
from vamseeachanta/workspace-hub

Sub-skill of great-tables: 1. Basic Table Creation.

brand-guidelines-primary-colors

5
from vamseeachanta/workspace-hub

Sub-skill of brand-guidelines: Primary Colors (+3).

test-oversized-skill

5
from vamseeachanta/workspace-hub

A test fixture skill that exceeds 200 lines with multiple H2/H3 sections for split testing.

interactive-report-generator

5
from vamseeachanta/workspace-hub

Generate interactive HTML reports with Plotly visualizations from data analysis results. Supports dashboards, charts, and professional styling.

data-validation-reporter

5
from vamseeachanta/workspace-hub

Generate interactive validation reports with quality scoring, missing data analysis, and type checking. Combines Pandas validation, Plotly visualization, and YAML configuration for comprehensive data quality reporting.