You almost have it. What should work is the following:
circles = circle([717.0, 387.0, 737.0], [469.0, 265.0, 25.0], [100.0])
fills = fill(["bisque", "red", "green"])
The subtle difference is to use vectorized circle/fill instead of a vector
of circles and fills.
The idea is that vectorized properties (like fill) distribute over
vectorized forms (like circle). What Rene suggests, putting each circle and
fill in its own context, also works but is a little more work.
Here's some central semantics that I think your missing (which is not your
fault, compose is poorly documented):
1. Forms and properties in Compose are always vectorized. So that
fill("bisque") is just shorthand for fill(["bisque"])
2. There can only be only property of each type in a context. So if you
say compose(ctx, fill("bisque"), fill("red")), red clobbers bisque.
3. Vectors in vectorized forms/properties are cycled, which is why I can
write [100.0] instead of [100.0, 100.0, 100.0] in circle, and if I use
fill("red") all the circles will be red.
4. Like I mentioned, vectorized properties distribute over vectorized
forms, but the property must either be the same length as the form, or be
of length 1.
On Monday, May 11, 2015 at 5:12:40 AM UTC-7, Peter Kristan wrote:
>
>
> compose(context(),
> circle([0.25, 0.5, 0.75], [0.25, 0.5, 0.75], [0.1]),
> fill([LCHab(92, 10, 77), LCHab(68, 74, 192), LCHab(78, 84, 29)]))
>
> This code draws 3 circles in their respective colors defined in fill()
>
> The code bellow is what I tried, but all the circles turned out green. How
> would I make it so that that first circle would be bisque, the second red,
> and the third green?
>
> circles = [circle(717.0,469.0,100.0),circle(387.0,265.0,100.0),circle(
> 737.0,25.0,100.0)]
> fills = [fill("bisque"), fill("red"), fill("green")]
>
> composition = compose(context(units=UnitBox(0,0,1000,1000)),
> circles...,
> fills...
> )
>
> Something like this, only from arrays:
> compose(context(),
> circle([0.25, 0.5, 0.75], [0.25, 0.5, 0.75], [0.1]),
> fill([LCHab(92, 10, 77), LCHab(68, 74, 192), LCHab(78, 84, 29)]))
>
>
> Thanks!
>