Update color.go

This commit is contained in:
Chris 2023-08-26 21:37:04 -04:00 committed by Garrett D'Amore
parent e1cc2cb21f
commit 61f49ebde1
1 changed files with 2 additions and 2 deletions

View File

@ -1043,7 +1043,7 @@ func (c Color) Hex() int32 {
return -1 return -1
} }
if c&ColorIsRGB != 0 { if c&ColorIsRGB != 0 {
return int32(c) & 0xffffff return int32(c & 0xffffff)
} }
if v, ok := ColorValues[c]; ok { if v, ok := ColorValues[c]; ok {
return v return v
@ -1070,7 +1070,7 @@ func (c Color) TrueColor() Color {
return ColorDefault return ColorDefault
} }
if c&ColorIsRGB != 0 { if c&ColorIsRGB != 0 {
return c return c | ColorValid
} }
return Color(c.Hex()) | ColorIsRGB | ColorValid return Color(c.Hex()) | ColorIsRGB | ColorValid
} }