initial commit

This commit is contained in:
2025-07-25 13:41:23 +02:00
commit 840de62902
27 changed files with 1772 additions and 0 deletions

19
model_color.go Normal file
View File

@ -0,0 +1,19 @@
package niri
import (
"image/color"
"math"
)
type niriColor struct {
RGB [3]float64 `json:"rgb"`
}
func (c niriColor) AsColor() color.Color {
return color.NRGBA64{
R: uint16(c.RGB[0] * math.MaxUint16),
G: uint16(c.RGB[1] * math.MaxUint16),
B: uint16(c.RGB[2] * math.MaxUint16),
A: math.MaxUint16,
}
}