Color operations

From vchelaru/FlatRedBall · View interactive version

Color operations is an AI agent skill from the GitHub repository vchelaru/FlatRedBall. FlatRedBall ColorOperation enum (Add, Modulate, Color, etc.) shared across visual object types. Triggers: ColorOperation, mColorOperation, Sprite.ColorOperation, RenderableIpso, RenderableSkiaObject, AnimationFrame.ColorOperation, UpdateVertexColorsAccordingToAlpha.

How to use this skill

Skill file

Where it lives

ColorOperation enum: Engines/FlatRedBallXNA/FlatRedBall/Graphics/GraphicalEmumerations.cs.

It's not Sprite-specific — consumers include:

| Type | File | Notes |

|---|---|---|

| Sprite | Engines/FlatRedBallXNA/FlatRedBall/Sprite.cs | Full support, all enum values; setter calls UpdateVertexColorsAccordingToAlpha |

| AnimationFrame | Engines/FlatRedBallXNA/FlatRedBall/Graphics/Animation/AnimationFrame.cs | Nullable per-frame override, applied in Sprite.UpdateToAnimationFrame |

| RenderableSkiaObject (Gum/SkiaSharp text, SVG) | Engines/SkiaGum/Renderables/RenderableSkiaObject.cs | Hardcoded to Modulate, read-only — does not respect Add/Subtract/etc. |

| Renderer global state | Engines/FlatRedBallXNA/FlatRedBall/Graphics/Renderer.cs | Static ColorOperation property drives shader technique selection via _effectManager.GetVertexColorTechniqueFromColorOperation |

Gotchas

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.