diff --git a/color.go b/color.go index a70ff72..032f406 100644 --- a/color.go +++ b/color.go @@ -67,6 +67,9 @@ func (c NRGBA) RGBA() (r, g, b, a uint32) { // NRGBAModel converts colors to NRGBA format. var NRGBAModel = color.ModelFunc(func(c color.Color) color.Color { + if c, ok := c.(NRGBA); ok { + return c + } r, g, b, a := c.RGBA() if a == 0 { return NRGBA{0, 0, 0, 0}