module

Gradientty

Class methods

crystal(str : String)

Predefined crystal-style gradient.

str - The string to color.

Example:

puts Gradientty.crystal("Hello Crystal!")
Source
gradient(colors : Array(String))

Factory method: creates a ColorInstance from an array of hex color strings.

colors - Array of hex color strings for the gradient.

Example:

custom = Gradientty.gradient(["#ff0000", "#00ff00"])
puts custom.call("Hello")
Source
pastel(str : String)

Predefined pastel gradient.

str - The string to color.

Example:

puts Gradientty.pastel("Hello Pastel!")
Source
rainbow(str : String)

Predefined rainbow gradient.

str - The string to color.

Example:

puts Gradientty.rainbow("Hello Rainbow!")
Source
vice(str : String)

Predefined vice-style gradient.

str - The string to color.

Example:

puts Gradientty.vice("Hello Vice!")
Source

Nested types