Falk Joensson's
Eas (Easy Application Script)

Rendering 2D Drawings:18. Advanced Colorizing

DRAW'PAINT! changes the color of all shapes to black (any transparency remains unchanged) DRAW'PAINT:c changes the color of all shapes to the color c (originally transparent shapes remain transparent) given as either a string of the CSS'COLA formats #X #XA #RGB #RGBA #RRGGBB #RRGGBBAA or a CSS color mixer string of the formats rgb(RRR,GGG,BBB) rgba(RRR,GGG,BBB,AAA) which can be generated with CSS'COLA DRAW'PAINT:c1 c2 ... applies a color gradient to all shapes (originally transparent shapes remain transparent) from the colors c1, c2, etc starting at the outside, the last color defining the innermost color all given as either a string of the CSS'COLA formats #X #XA #RGB #RGBA #RRGGBB #RRGGBBAA or a CSS color mixer string of the formats rgb(RRR,GGG,BBB) rgba(RRR,GGG,BBB,AAA) which can be generated with CSS'COLA note that big shapes get distorted towards a square (the pixel shape) in the middle
DRAW'PLASMA:(x1 y1 c1) (x2 y2 c2) ... fills the drawing (the current layer) so that the given points x,y have their color c, interpolating the colors throughout the space the colors c must be given as either a string of the CSS'COLA formats #X #XA #RGB #RGBA #RRGGBB #RRGGBBAA or a CSS color mixer string of the formats rgb(RRR,GGG,BBB) rgba(RRR,GGG,BBB,AAA) which can be generated with CSS'COLA
DRAW'PLASMA:((x1 y1 c1) (x2 y2 c2) ...) the color definition can also be given as a single-parameter vector holding all the color points DRAW'PLASMA:(n x y c) ... each point can have a name prefix string n of the format [a-zA-Z]\w* to create a hook for later shapes see the second-last option under S Drawing Shapes DRAW'PLASMA:(r x y c) ... each point of a shape can have a relativeness prefix string r its format is (\d*|[a-zA-Z]\w*)-?[+<] see the last option under S Drawing Shapes Tip: Use DRAW'PLASMA together with DRAW'CUT:-1 and DRAW to create freely colored shapes, such as polygons with individually colored corners.
DRAW'WAVES:(lhm xf yf xa ya xp yp) fills the drawing (the current layer) with a regular black-and-white pattern generated from periodic wave functions defined by the vector parameters lhm low/high/mode is a string of the format /^([\dA-F]{2})?#?$/i [\dA-F]{2} defines the low and high peak levels of the channel wave # switches the wave mode from additive x+y to multiplicative x*y xf,yf set the wave frequency in multiples of the image width/height xa,ya set the wave amplification factor higher values result in harmonic folding waves xp,yp set the phase offset in percent of a whole wave base period setting only xf or xa will also set yf and ya to the same value
DRAW'WAVES:r g b 0 fills the drawing (the current layer) with a regular pattern generated from periodic wave functions for each of the channels red/green/blue the parameters each are as for the black-and-white variant alternatively, a channel can be given as a fixed solid color level 0..255
 
18. Advanced Colorizing
D Download Eas 4B
O Donate
C Contact
Esc Search / Table of Contents