@ -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}