-
-
Notifications
You must be signed in to change notification settings - Fork 757
Closed
Description
Operating System
- Windows
- macOS
- Linux
- FreeBSD
- OpenBSD
- Android
- iOS
- Nintendo Switch
- PlayStation 5
- Xbox
- Web Browsers
What feature would you like to be added?
Usually when I deal with ColorScale in the engine, I'd like to change the color to be exactly as my desired color.Color.
Would it be possible to add
func (c *ColorScale) Set(r, g, b, a float32) {
c.r_1 = r - 1
c.g_1 = g - 1
c.b_1 = b - 1
c.a_1 = a - 1
}
and/or
func (c *ColorScale) SetWithColor(clr color.Color) {
cr, cg, cb, ca := clr.RGBA()
c.Set(float32(cr)/0xffff, float32(cg)/0xffff, float32(cb)/0xffff, float32(ca)/0xffff)
}
functions?
Why is this needed?
ease of use, instead of calling SetR/SetG/SetB/SetA separately
Reactions are currently unavailable