add sensor handling.

This commit is contained in:
2023-01-08 16:43:08 +01:00
parent 8c10b15dd8
commit 956bd970a0
12 changed files with 357 additions and 59 deletions
+2 -2
View File
@@ -280,9 +280,9 @@ func (col *Color) String() string {
case col.XY != nil:
return fmt.Sprintf("xy:%.4f,%.4f", col.XY.X, col.XY.Y)
case col.HS != nil && col.K != nil:
return fmt.Sprintf("hsk:%.4f,%.3f,%d", col.HS.Hue, col.HS.Sat, *col.K)
return fmt.Sprintf("hsk:%.2f,%.3f,%d", col.HS.Hue, col.HS.Sat, *col.K)
case col.HS != nil:
return fmt.Sprintf("hs:%.4f,%.3f", col.HS.Hue, col.HS.Sat)
return fmt.Sprintf("hs:%.2f,%.3f", col.HS.Hue, col.HS.Sat)
case col.K != nil:
return fmt.Sprintf("k:%d", *col.K)
default: