TESTER

palette_easing

palette_easing(easing, from, to, values) -> List of <values> colors

Returns a slice of colors, blended between two colors, width an easing transition, including colors from/to

Syntaxe

var col = palette_tint(color="FFC107", values=10)

Arguments

NameRequiredDefaultDescription
easingyes-Name of easing function
fromyes-Color from
toyes-Color to
valuesyes-Numbers of colors, 3 mins

Full example

var col1 = "#FFC107";
var col2 = "#1976D2";
var radius = 20;
var offsetX = 100;
var values = 30;
var ease = easing_list();
var y = radius + radius/2;
canvas(width=1380, height=1670);
for (var e=0; e<ease.length;e++) {

    var col = palette_easing(easing=ease[e], from=col1, to=col2, values=values);

    for (var i=0; i<col.length; i++) {
        circle(x=(radius*2)+i*(radius*2), y=y, radius=radius, fill=col[i]);
    }
    text(ease[e], (radius*2)+col.length*(radius*2), y, ay=MIDDLE); 
    y += radius*2;
}
save("palette_easing.png");