mirror of
https://github.com/taigrr/simplecolorpalettes.git
synced 2026-04-02 04:59:08 -07:00
Add New() func
This commit is contained in:
@@ -92,6 +92,10 @@ func (p SimplePalette) ToAnsi16() (sp SimplePalette) {
|
||||
return
|
||||
}
|
||||
|
||||
func New(color int) SimpleColor {
|
||||
return SimpleColor(color)
|
||||
}
|
||||
|
||||
func FromRGBA(r, g, b, _ uint32) SimpleColor {
|
||||
c := r
|
||||
c = c<<8 + g
|
||||
|
||||
Reference in New Issue
Block a user