14 lines
286 B
Go
14 lines
286 B
Go
|
package igwrap
|
||
|
|
||
|
import "github.com/inkyblackness/imgui-go/v4"
|
||
|
|
||
|
// Color converts non-premultiplied RGBA color into imgui.Vec4.
|
||
|
func Color(r, g, b, a uint8) imgui.Vec4 {
|
||
|
return imgui.Vec4{
|
||
|
X: float32(r) / 255,
|
||
|
Y: float32(g) / 255,
|
||
|
Z: float32(b) / 255,
|
||
|
W: float32(a) / 255,
|
||
|
}
|
||
|
}
|