diff --git a/internal/patterns/plasma.go b/internal/patterns/plasma.go index 3005ec5..01d5896 100755 --- a/internal/patterns/plasma.go +++ b/internal/patterns/plasma.go @@ -118,9 +118,9 @@ func singleColorPlasmaFromFloatVal(val float64, baseColor RGBcolor) (byte, byte, var g byte var b byte val = positiveModF(val) - r = baseColor[0] * val - g = baseColor[1] * val - b = baseColor[2] * val + r = byte(math.Trunc(float64(baseColor[0]) * val)) + g = byte(math.Trunc(float64(baseColor[1]) * val)) + b = byte(math.Trunc(float64(baseColor[2]) * val)) return r, g, b } diff --git a/internal/webserver/webserver.go b/internal/webserver/webserver.go index 7a29c1c..901918f 100755 --- a/internal/webserver/webserver.go +++ b/internal/webserver/webserver.go @@ -174,9 +174,9 @@ func HandleHTTP(queueChannel chan queue.QueueItem, Port int, overrideChannel cha r.HandleFunc("/colorpattern/{color}/{pattern}/", PatternHandler) r.HandleFunc("/colorpattern/{color}/{pattern}/{duration}", PatternHandler) r.HandleFunc("/colorpattern/{color}/{pattern}/{duration}/{speed}", PatternHandler) - r.HandleFunc("/bloop/{name}", ColourHandler) - r.HandleFunc("/bloop/{name}/override={override}", ColourHandler) - r.HandleFunc("/bloop/{name}/{duration}", ColourHandler) + r.HandleFunc("/colour/{name}", ColourHandler) + r.HandleFunc("/colour/{name}/override={override}", ColourHandler) + r.HandleFunc("/colour/{name}/{duration}", ColourHandler) r.HandleFunc("/color/{name}", ColourHandler) r.HandleFunc("/color/{name}/override={override}", ColourHandler) r.HandleFunc("/color/{name}/{duration}", ColourHandler)