Skip to content

gum style --foreground red silently fails - no validation or error for invalid color names #980

@khan-de-code

Description

@khan-de-code

Describe the bug
The gum style command accepts invalid color names like "red" without validation or error messages, resulting in no color output and confusing user experience.

To Reproduce
Steps to reproduce the behavior:

  1. Run: gum style --foreground red "This should be red"
  2. Observe: Text appears with no color formatting
  3. Compare with: gum style --foreground "#FF0000" "This should be red" (works correctly)

Expected behavior

  • Support common color names like "red", "green", "blue", etc.
  • Show clear error message for invalid color values
  • Document supported color formats in help text

Actual Behavior

  • Invalid color names are silently ignored
  • No error message or warning
  • Users get confused why colors don't work

Environment:
• gum version: gum version 0.17.0
• OS: macOS
• Terminal: iTerm2

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions