palette_quadratic
palette_quadratic(color) -> List of 3 colors
Return the quadratic colors
Syntaxe
var col = palette_quadratic(color="#FFC107")
Arguments
| Name | Required | Default | Description |
|---|---|---|---|
color | yes | - | Color |
Full example
canvas(width=450, height=100);
var base = "#FFC107";
var col = palette_quadratic(color=base);
console(col);
circle(x= 50, y=50, radius=40, fill=base);
circle(x=200, y=50, radius=40, fill=col[0]);
circle(x=300, y=50, radius=40, fill=col[1]);
circle(x=400, y=50, radius=40, fill=col[2]);
arrow(x=150, y=50, rotation=0, length=50, shaft=10, head=25, position=true);
save("palette_quadratic.png");
