mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 04:42:33 +02:00
23 lines
323 B
Go
23 lines
323 B
Go
package notif
|
|
|
|
import "fmt"
|
|
|
|
type Color uint
|
|
|
|
const (
|
|
Red Color = 0xff0000
|
|
Green Color = 0x00ff00
|
|
Blue Color = 0x0000ff
|
|
)
|
|
|
|
func (c Color) HexString() string {
|
|
return fmt.Sprintf("#%x", c)
|
|
}
|
|
|
|
func (c Color) DecString() string {
|
|
return fmt.Sprintf("%d", c)
|
|
}
|
|
|
|
func (c Color) String() string {
|
|
return c.HexString()
|
|
}
|