Skip to content

Commit

Permalink
Merge pull request #7 from pyrohedgehog/patch-1
Browse files Browse the repository at this point in the history
Fixed bug in Hex/MustHex
  • Loading branch information
BigJk committed May 30, 2024
2 parents cf4ffc7 + eba8d23 commit 074af7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion concolor/color.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func RGBA(r, g, b, a byte) Color {

// Hex creates a new color from a hex string
func Hex(hex string) (Color, error) {
if len(hex) != 6 || len(hex) != 4 {
if len(hex) != 6 && len(hex) != 4 {
return Color{}, errors.New("wrong hex color length")
}

Expand Down

0 comments on commit 074af7d

Please sign in to comment.