Paper Office
paper-xlsxAPI referencestyles.fills

GradientFill

paper-xlsx 0.2.1 API reference

Fill areas with gradient

Two types of gradient fill are supported:

  • A type='linear' gradient interpolates colours between a set of specified Stops, across the length of an area. The gradient is left-to-right by default, but this orientation can be modified with the degree attribute. A list of Colors can be provided instead and they will be positioned with equal distance between them.

  • A type='path' gradient applies a linear gradient from each edge of the area. Attributes top, right, bottom, left specify the extent of fill from the respective borders. Thus top="0.2" will fill the top 20% of the cell.

GradientFill(type='linear', degree=0, left=0, right=0, top=0, bottom=0, stop=())

Attributes

bottom

attributebottom
= bottom

degree

attributedegree
= degree

fill_type

attributefill_type
= Alias('type')

idx_base

attributeidx_base
= 0

left

attributeleft
= left

namespace

attributenamespace
= None
attributeright
= right

stop

attributestop
= stop

tagname

attributetagname
= 'gradientFill'

top

attributetop
= top

type

attributetype
= type

Functions

__iter__

func__iter__()

from_tree

funcfrom_tree(el)
paramel

to_tree

functo_tree(tagname=None, namespace=None, idx=None)
paramtagname
= None
paramnamespace
= None
paramidx
= None

On this page