Color and transparency gradients

gradientLibreOffice 4.3 (see daily builds of its development version) will support color and transparency gradients in LibreLogo:

FILLCOLOR [“YELLOW”, “RED”, 2, 0, 0, 25, 75]
FILLTRANSPARENCY [100, 0]
CIRCLE 100

FILLCOLOR defines a radial color gradient, from yellow to red, the center is positioned horizontally 25% and vertically 75% from the left upper corner of the shape. FILLTRANSPARENCY defines a linear transparency gradient, too.
gradient2Next example shows linear color and radial transparency gradients:

FILLCOLOR [“YELLOW”, “RED”]
FILLTRANSPARENCY [100, 0, 2, 0, 0, 25, 75]
CIRCLE 100

gradient3This code draws circles with random color gradients:

PENUP
REPEAT 100 [
    FILLCOLOR [ANY, ANY]
    CIRCLE 20 + RANDOM 130
    POSITION ANY
]

Leave a Reply

Your email address will not be published. Required fields are marked *