color_lighter
color_lighter(color, perc) -> Hex color
Returns a lighter version of the specified color
Syntaxe
var col = color_lighter(color="#FFC107", perc=0.4);
Arguments
| Name | Required | Default | Description |
|---|---|---|---|
color | yes | - | Color |
perc | yes | - | Percentage (0-1) |
Full example
canvas(width=250, height=100);
var base = "#FFC107";
var col = color_lighter(color=base, perc=0.4);
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("color_lighter.png");
