New
new()
Create a new palette based on a base style
The functions returned by this function have the following named arguments:
You can use a palette for stroking via: red.with(stroke: true).
let p = cetz.palette.new(colors: (red, blue, green))
for i in range(0, p("len")) {
set-style(..p(i))
circle((0,0), radius: .5)
set-origin((1.1, 0))
}
If true, the returned fill color is one of the colors from the colors list, otherwise the base styles fill is used.
If true, the returned stroke color is one of the colors from the colors list, otherwise the base styles stroke color is used.