vchelaru/gum/gum-styling
Claude Code and agent skill by vchelaru/gum
- community
Checking that the SKILL.md file is still in the repository.
Restyling Gum Forms controls without a Theme — global colors/fonts, one control's look, custom states. Triggers: Styling.ActiveStyle, ButtonVisual, BackgroundColor, States.Enabled.Apply, "make the button red", Styles component.
Install
npx vskill@latest install vchelaru/gum/gum-stylingSKILL.md
Gum Styling
Styling changes how Forms controls look, either for every control at once or for one control. For a complete pre-built look, use a Theme instead (see gum-theming). The state/category model this builds on is introduced in gum-forms-controls. Docs: <https://docs.flatredball.com/gum/code/styling>.
First question: where do your controls' visuals come from?
| Your controls come from | Restyle with | |
|---|---|---|
Code only (new Button(), no Gum project), or a Theme package | Styling.ActiveStyle and the casted Visual (below) | |
Forms components in a Gum project (.gumx, added through Add Forms) | The project's Styles component and each component's states, edited in the Gum tool |
Landmine: a Forms component in a loaded Gum project replaces the code default visual for that control type, so Styling.ActiveStyle has no effect on it. If a style change "does nothing," check this first. To change project styles from code, see <https://docs.flatredball.com/gum/code/styling/runtime-variable-references>.
Every control: Styling.ActiveStyle
Colors holds the named colors, Text holds three font states (Normal, Strong, Emphasis), and NineSlice/Icons/SpriteSheet hold the background textures. Hover and press shades are derived from these colors, so you don't set them separately. The full list of colors and which controls use each one is in the docs page "Styling Using ActiveStyles."
Landmine: set styling before creating controls. A control reads ActiveStyle when it is constructed. Controls created earlier keep the old look, and nothing refreshes them.
Changing the font family with SetValue("Font", "Consolas", "string") needs runtime font generation (KernSmith) to be set up. See the docs page "Font Strategies."
One control: cast Visual
Each control's Visual casts to <ControlName>Visual (ButtonVisual, TextBoxVisual, ...), which exposes color properties:
Landmine: use the color property, not the child's color. visual.Background.Color = ... looks like it works, but the next hover or press resets it, because the states write the child's color from BackgroundColor. Only set a child directly when you also replace the states.
The background is a NineSliceRuntime. Swap its look with visual.Background.ApplyState(Styling.ActiveStyle.NineSlice.Bordered) or a custom Texture. The control's color multiplies the texture, so use white or grayscale art.
Custom behavior on hover/press: states
Clear() removes the default variables. Assign Apply with = so the default color logic is replaced. A state can change any property (size, font scale), not just color. Each visual has a different state set (CheckBox has On/Off/Indeterminate variants of each). See the docs page "Styling Using States" for the full table.
Replacing a control's visual for every instance
MyButtonVisual usually subclasses the V3 visual (ButtonVisual) and replaces its children. This is how Themes are built. If you are restyling most controls this way, consider starting from a Theme instead (gum-theming).
In the Gum tool
Duplicate a Forms component (for example ButtonStandard → OrangeButton) and edit the colors in every state of its category, plus the Default state the tool previews with. Shared colors and fonts live in the Styles component. Docs: "Control Customization in Gum Tool."
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinggum-skills/gum-styling/SKILL.md
Popularity
- Repository stars
- 634
- Repository forks
- 84
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/vchelaru/gum/gum-styling)