Add New() func

This commit is contained in:
2022-10-02 23:59:56 -07:00
parent 8bdfc9cca6
commit ee7afb7cfb

View File

@@ -92,6 +92,10 @@ func (p SimplePalette) ToAnsi16() (sp SimplePalette) {
return return
} }
func New(color int) SimpleColor {
return SimpleColor(color)
}
func FromRGBA(r, g, b, _ uint32) SimpleColor { func FromRGBA(r, g, b, _ uint32) SimpleColor {
c := r c := r
c = c<<8 + g c = c<<8 + g