Shimmer
Shimmer creates an independent animation where each character is coloured based on its position in a sweeping gradient wave.

// Default gradient
clog.Shimmer("Indexing documents").
Wait(ctx, action).
Msg("Indexed")
// Custom gradient with direction
clog.Shimmer("Synchronizing",
clog.ColorStop{Position: 0, Color: colorful.Color{R: 0.3, G: 0.3, B: 0.8}},
clog.ColorStop{Position: 0.5, Color: colorful.Color{R: 1, G: 1, B: 1}},
clog.ColorStop{Position: 1, Color: colorful.Color{R: 0.3, G: 0.3, B: 0.8}},
).
ShimmerDirection(clog.DirectionMiddleIn).
Wait(ctx, action).
Msg("Synchronized")
Use DefaultShimmerGradient() to get the default gradient stops.
Directions
| Constant | Description |
|---|---|
DirectionRight | Left to right (default) |
DirectionLeft | Right to left |
DirectionMiddleIn | Inward from both edges |
DirectionMiddleOut | Outward from the center |
DirectionBounceIn | Inward from both edges, then bounces out |
DirectionBounceOut | Outward from center, then bounces in |

Speed
Control how fast the animation cycles with Speed(cyclesPerSecond). The default is 0.5 (one full cycle every two seconds) for both Shimmer and Pulse. Values ≤ 0 are treated as the default.
clog.Shimmer("Fast shimmer").
Speed(2.0). // 2 gradient cycles per second
Wait(ctx, action).
Msg("Done")
clog.Pulse("Quick pulse").
Speed(1.5). // 1.5 oscillations per second
Wait(ctx, action).
Msg("Done")
Both pulse and shimmer use ColorStop for gradient definitions:
type ColorStop struct {
Position float64 // 0.0-1.0
Color colorful.Color // from github.com/lucasb-eyer/go-colorful
}