# styling

Rule for styling mobjects in ManimGL: fill, stroke, opacity, and visual effects. Use it when building animations and want consistent, reusable styling across objects.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 78316 repo stars
- Author: calesthio
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/calesthio/OpenMontage/tree/HEAD/.agents/skills/manimgl-best-practices/rules/styling.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/styling

## What it does

This rule covers all styling approaches for ManimGL objects — from basic fill and stroke to advanced gloss, shadow, and backstroke effects. It shows how to set styles at object creation or afterward, control fill and stroke opacity independently, copy styles between objects via `match_style()`, and define reusable style functions.

Includes examples of gradient fills across submobjects, neon effects using layered strokes, animated color and opacity transitions, and combining multiple properties. For text, backstroke creates a dark outline behind characters to keep text readable over complex backgrounds.

The rule assumes Python and a working ManimGL installation.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/styling.md` — The paths frontmatter field limits the files

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### Cursor

**Manually: put the files in place**
- File: `.cursor/rules/styling.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/styling.instructions.md` — The applyTo field sets which files it applies to

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/styling.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/styling.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/calesthio/OpenMontage/tree/HEAD/.agents/skills/manimgl-best-practices/rules/styling.md

## When to use it
- apply gradient colors across a group of shapes
- create neon effect with layered stroke outlines
- keep text readable over complex backgrounds using backstroke
- copy styling between objects
- animate smooth transitions between colors and opacity values

## Example prompts
- Create three circles: one with solid fill, one semi-transparent, one with outline only
- Apply gradient from blue to yellow across a row of squares
- Style text with a glowing outline and backstroke for clarity on busy backgrounds

## Similar
- [manimgl-best-practices](https://affpapa.org/en/nevibecode/skills/manimgl-best-practices.md) — skill · 2600 installs
- [material-ui-styling](https://affpapa.org/en/nevibecode/skills/material-ui-styling.md) — skill · 777 installs
- [ui-styling](https://affpapa.org/en/nevibecode/rules/ui-styling.md) — rule · ★ 1216 repo stars
- [Animation Principles - Expert](https://affpapa.org/en/nevibecode/skills/animation-principles-expert.md) — skill · 572 installs
- [manim-explainer-animation](https://affpapa.org/en/nevibecode/skills/manim-explainer-animation.md) — skill · 157 installs
- [temple-generator](https://affpapa.org/en/nevibecode/skills/temple-generator.md) — skill · 199 installs

## Other versions with the same name
- [styling · devin-axis](https://affpapa.org/en/nevibecode/rules/devin-axis-styling.md) — ★ 7523 repo stars
- [styling · maxtrigify](https://affpapa.org/en/nevibecode/rules/maxtrigify-styling.md) — ★ 141 repo stars

From the same set: [calesthio/openmontage](https://affpapa.org/en/nevibecode/by/calesthio/openmontage.md) — 101 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
