# colors

colors is a Claude Code rule covering ManimGL palettes, gradients, and GLSL shading for coloring mathematical animations.

- 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/colors.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/colors

## What it does

This rule equips agents with syntax and patterns for color handling in ManimGL (`manimlib`). It covers primary palette constants, gradient shade variations marked from `A` to `E`, interpolation utilities, and converters for RGB and Hex strings.

It guides the model through coloring specific characters inside `Text` and `Tex` objects, running animated transitions with `animate.set_color`, and applying gradients across submobjects. For 3D meshes, it specifies GLSL snippets using `set_color_by_code` alongside gloss and shadow settings.

Scripts using this rule fail immediately without ManimGL: the API calls target Grant Sanderson's `manimlib` codebase, which differs from Manim Community Edition.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/colors.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/colors.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

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

### Windsurf (Devin Desktop)

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

### Cline

**Manually: put the files in place**
- File: `.clinerules/colors.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/colors.md

## When to use it
- apply consistent ManimGL color constants and tonal scales across scenes
- colorize distinct math symbols within Tex objects using substring matching
- render procedural colors on 3D surfaces with GLSL shader snippets
- manage stroke opacity, fills, gloss, and shadows on vector groups

## Example prompts
- Color individual variables in this Tex equation using ManimGL t2c mapping
- Create a smooth color gradient across a VGroup of squares
- Apply viridis shading to a Sphere using set_color_by_xyz_func in ManimGL

## Similar
- [manimgl-best-practices](https://affpapa.org/en/nevibecode/skills/manimgl-best-practices.md) — skill · 2600 installs
- [manim](https://affpapa.org/en/nevibecode/skills/manim.md) — skill · 1400 installs
- [manimce-best-practices](https://affpapa.org/en/nevibecode/skills/manimce-best-practices.md) — skill · 4800 installs
- [code-loop](https://affpapa.org/en/nevibecode/skills/code-loop.md) — skill · ★ 541 repo stars
- [motion-background](https://affpapa.org/en/nevibecode/skills/motion-background.md) — skill · 5500 installs
- [better-colors](https://affpapa.org/en/nevibecode/skills/better-colors.md) — skill · 42600 installs

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
