Skip to main content
rule CX Codex

colors — Claude Code rule: coloring formulas and 3D scenes

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

AGPL-3.0 ★ 78,316 updated 2026-10-24

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/colors.md
Open on GitHub

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

What it helps with

  • 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 for the agent

  • 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

How to install colors

Manually: put the files in place

.claude/rules/colors.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about colors

How to install colors in Claude Code?

Add the rule file directly to your project path at .claude/rules/colors.md.

What does the colors rule do?

It instructs code generation models on how to handle palettes, gradients, and GLSL shaders in ManimGL animation scripts.

Does this rule work with Manim Community Edition?

It targets manimlib features such as GLSL shading hooks and specific color utility paths, so direct compatibility with Manim Community is not guaranteed.

Similar IDE rules

All IDE rules for Design →

From the same set101

The whole set →
lyria Builds prompts and checks music from Google Lyria through the Gemini API. Fits into OpenMontage google_music calls and audio prep for video. CX Codex +1 ★ 78,316repo stars comfyui Guides OpenMontage tools through ComfyUI workflows for images, video, and audio, handling node IDs and VRAM constraints. CX Codex +1 ★ 78,316repo stars kinetic-beat-slam The kinetic-beat-slam rule shapes short phrases into beat-led kinetic typography, with separate entrances and a locked final stack for punchy text scenes. CX Codex +1 ★ 78,316repo stars threejs-world-generation threejs-world-generation turns a written brief into one continuous Three.js world with terrain, regions, scattered props and a camera flight. Made for cinematic scenes rather than single models. CX Codex +1 ★ 78,316repo stars cli The cli rule guides Claude Code through running ManimGL scenes, adjusting render options, and entering interactive debugging. Useful when working with manimgl in a project. CX Codex +1 ★ 78,316repo stars css-marker-patterns The css-marker-patterns rule shows five ways to mark text with plain CSS and GSAP timelines: a marker sweep, wobbly circle, radiating lines, wavy underline, and cross-out. CX Codex +1 ★ 78,316repo stars 3d Instructions for building ManimGL 3D scenes: camera frame controls, geometric primitives, textured surfaces, and screen-space labels. CX Codex +1 ★ 78,316repo stars creation-animations The creation-animations rule explains how to stage object, text, and formula entrances in ManimGL. Use it when a scene needs controlled creation effects. CX Codex +1 ★ 78,316repo stars

Project sponsors

Companies that keep this analytics open