(num float64, s string)
| 30 | } |
| 31 | |
| 32 | func normalStyle(num float64, s string) string { |
| 33 | red := uint8(math.Sin(num+0)*127 + 128) |
| 34 | green := uint8(math.Sin(num+2)*127 + 128) |
| 35 | blue := uint8(math.Sin(num+4)*127 + 128) |
| 36 | |
| 37 | c := &color.RGBA{R: red, G: green, B: blue, A: 255} |
| 38 | style := ansi.Style{}.ForegroundColor(c) |
| 39 | return style.Styled(s) |
| 40 | } |