local font_test = render.load_font("Arial", 62, "ba")
local gradient_animation = gradient.text_animate("Animated gradient text!", -3, {
color(55, 177, 218),
color(197, 75, 206)
})
local gradient_text = gradient.text("Gradient text!", false, {
color(0, 0, 255),
color(255, 0, 0),
color(0, 255, 0)
})
local gradient_text2 = gradient.text("Gradient text!", false, {
{color(55, 177, 218), 0},
{color(0, 0, 255), 0.5},
{color(197, 75, 206), 1.0}
})
local gradient_clr = gradient.linear({
color(0, 0, 255),
color(255, 0, 0),
color(0, 255, 0)
}, 0.5)
local gradient_clr2 = gradient.linear({
{color(55, 177, 218), 0},
{color(0, 0, 255), 0.5},
{color(197, 75, 206), 1.0}
}, 0.9)
events.render:set(function(ctx)
render.text(font_test, vector(23, 600), color(255, 0, 255), nil, gradient_animation:get_animated_text())
render.text(font_test, vector(23, 700), color(255, 0, 255), nil, gradient_text)
render.text(font_test, vector(23, 800), color(255, 0, 255), nil, gradient_text2)
render.text(font_test, vector(23, 900), gradient_clr, nil, "gradient_clr")
render.text(font_test, vector(23, 1000), gradient_clr2, nil, "gradient_clr2")
gradient_animation:animate()
end)