@@ -374,7 +374,10 @@ func blendColors(size int, stops ...color.Color) []color.Color {
374374 segmentSize := segmentSizes[i]
375375
376376 for j := range segmentSize {
377− t := float64(j) / float64(segmentSize)
377+ var t float64
378+ if segmentSize > 1 {
379+ t = float64(j) / float64(segmentSize-1)
380+ }
378381 c := c1.BlendHcl(c2, t)
379382 blended = append(blended, c)
380383 }