multica-ai/multica · error
color must be a 6-digit hex value like #3b82f6
Error message
color must be a 6-digit hex value like #3b82f6
What it means
Error "color must be a 6-digit hex value like #3b82f6" thrown in multica-ai/multica.
Source
Thrown at server/internal/handler/label.go:112
return value, nil
default:
return "", errors.New("resource_type must be issue, agent, or skill")
}
}
// 6-digit hex, with or without leading '#'.
var hexColorRE = regexp.MustCompile(`^#?[0-9a-fA-F]{6}$`)
// normalizeColor returns a canonical "#rrggbb" form or an error if invalid.
//
// LOAD-BEARING INVARIANT: LabelChip renders `style={{ backgroundColor: color }}`
// directly in the frontend. If this regex is ever relaxed to accept arbitrary
// CSS (named colors, `url(...)`, etc.), that inline style becomes an injection
// surface. Keep the regex strict.
func normalizeColor(c string) (string, error) {
c = strings.TrimSpace(c)
if !hexColorRE.MatchString(c) {
return "", errors.New("color must be a 6-digit hex value like #3b82f6")
}
if !strings.HasPrefix(c, "#") {
c = "#" + c
}
return strings.ToLower(c), nil
}
const maxLabelNameLen = 32
// validateLabelName trims and validates a label name. Returns the trimmed
// name or an error suitable for a 400 response.
func validateLabelName(raw string) (string, error) {
for _, r := range raw {
if unicode.IsControl(r) {
return "", errors.New("name cannot contain tabs, newlines, or control characters")
}
}
name := strings.TrimSpace(raw)View on GitHub (pinned to 2c0912b6ec)
Solutions
- Pass a 6-digit hex color with a leading '#', e.g. #3b82f6.
When it happens
Trigger: Thrown at server/internal/handler/label.go:112 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/f85c7cb75bd611a2.
Report an issue: GitHub.