Skip to content
Back to top
View this page

# BackgroundFillFreeformGradient

Added in version 21.2.

class telegram.BackgroundFillFreeformGradient(colors, *, api_kwargs=None)

  Bases: `telegram.BackgroundFill`

  The background is a freeform gradient that rotates after every message in the chat.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their `colors` is equal.

  Available In

  - `telegram.BackgroundTypeFill.fill`

  - `telegram.BackgroundTypePattern.fill`

  Added in version 21.2.

  Parameters:

    colors (Sequence[`int`]) – A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format

  type

    Type of the background fill. Always `FREEFORM_GRADIENT`.

    Type:

      `str`

  colors

    A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format

    Type:

      Sequence[`int`]