MCPcopy Create free account
hub / github.com/box-cli-maker/box-cli-maker / normalStyle

Function normalStyle

examples/lolcat/main.go:32–40  ·  view source on GitHub ↗
(num float64, s string)

Source from the content-addressed store, hash-verified

30}
31
32func 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}

Callers 1

lolcatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected