Generates a horizontal gradient between two colors.
This can be used for printing rainbow text or gradual transitions.
This function returns a single string with the gradient applied.
The text is split into characters, and each character is colored
according to its position in the gradient.
The gradient is calculated by interpolating between the start and end colors
based on the character’s index.
The result is a string where each character is styled with its corresponding color.
Generates a gradient from a vector of colors, distributed across text.
This function creates a gradient that transitions through multiple colors.
The colors are evenly distributed across the text.
Generates a 3-color gradient (start -> mid, mid -> end)
This function creates a gradient that transitions from the start color to the mid color,
and then from the mid color to the end color.
Alias for generate()
This function is a convenience function that calls the generate function
with the provided text and colors.
It returns the generated gradient string.