goutil/image/color/color.go

10 lines
188 B
Go
Raw Normal View History

2024-06-23 06:45:58 -06:00
package ucolor
import "image/color"
// Transparent returns whether or not a color has transparency.
func Transparent (c color.Color) bool {
_, _, _, a := c.RGBA()
return a != 0xFFFF
}