color_complementary
Return the complementary color
color_complementary(
color
) -> Hex color
Return the complementary color
Syntaxe
var col = color_complementary(color="#FFC107")
Arguments
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
color | string | yes | - | Color |
Full example
canvas(width=250, height=100);
var base = "#FFC107";
var col = color_complementary(color=base);
circle(x= 50, y=50, radius=40, fill=base);
circle(x=200, y=50, radius=40, fill=col);
arrow(x=150, y=50, rotation=0, length=50, shaft=10, head=25, position=true);
save(whoami(png=true));
