Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# BackgroundFillGradient

Added in version 21.2.

class telegram.BackgroundFillGradient(top_color, bottom_color, rotation_angle, *, api_kwargs=None)

  Bases: `telegram.BackgroundFill`

  The background is a gradient fill.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their `top_color`, `bottom_color` and `rotation_angle` are equal.

  Available In

  - `telegram.BackgroundTypeFill.fill`

  - `telegram.BackgroundTypePattern.fill`

  Added in version 21.2.

  Parameters:

    - top_color (`int`) – Top color of the gradient in the RGB24 format.

    - bottom_color (`int`) – Bottom color of the gradient in the RGB24 format.

    - rotation_angle (`int`) – Clockwise rotation angle of the background fill in degrees; 0-`359`.

  type

    Type of the background fill. Always `GRADIENT`.

    Type:

      `str`

  top_color

    Top color of the gradient in the RGB24 format.

    Type:

      `int`

  bottom_color

    Bottom color of the gradient in the RGB24 format.

    Type:

      `int`

  rotation_angle

    Clockwise rotation angle of the background fill in degrees; 0-`359`.

    Type:

      `int`