5.1. Color Functions¶
These functions can be used for filling the layer with color:
layers = [Layer(color=mycolor)]
[mycolor]
type=solid
color = (0,0,0)
Each color function has it’s own parameters.
5.1.1. Solid color¶
- class fonteffects.Solid(*k, **kw)[source]
Creates solid fill with a single color
Parameters: color – A color as (r,g,b) [0,255]
5.1.2. Gradient color¶
- class fonteffects.Gradient(*k, **kw)[source]
Creates a gradient between two or more colors.
Parameters: - colors – A list of colors (3 tuples) to interpolate between. [bottom color, ..., top color]
- angle – The angle of rotation (in degrees)
5.1.3. Texture fill¶
- class fonteffects.Texture(*k, **kw)[source]
Applies a texture as a color function
Parameters: - options – The command line options
- name – The texture name relative to options.datadir.
5.1.4. Stripes¶
- class fonteffects.Stripes(*k, **kw)[source]
Creates stripes with alternating colors
Parameters: - width – The width of the stripes
- offset – The start offset of the stripes
- angle – The angle of rotation (in degrees)
- colors – The alternating colors of the stripes. May be more than 2
5.1.5. DistanceField¶
- class fonteffects.DistanceField(*k, **kw)[source]
Calculates a distance field for each glyph