Skip to content
Back to top
View this page

# BackgroundFill

Added in version 21.2.

class telegram.BackgroundFill(type, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  Base class for Telegram BackgroundFill Objects. It can be one of:

  - `telegram.BackgroundFillSolid`

  - `telegram.BackgroundFillGradient`

  - `telegram.BackgroundFillFreeformGradient`

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

  Available In

  - `telegram.BackgroundTypeFill.fill`

  - `telegram.BackgroundTypePattern.fill`

  Added in version 21.2.

  Parameters:

    type (`str`) – Type of the background fill. Can be one of: `SOLID`, `GRADIENT` or `FREEFORM_GRADIENT`.

  type

    Type of the background fill. Can be one of: `SOLID`, `GRADIENT` or `FREEFORM_GRADIENT`.

    Type:

      `str`

  FREEFORM_GRADIENT = 'freeform_gradient'

    `telegram.constants.BackgroundFillType.FREEFORM_GRADIENT`

  GRADIENT = 'gradient'

    `telegram.constants.BackgroundFillType.GRADIENT`

  SOLID = 'solid'

    `telegram.constants.BackgroundFillType.SOLID`

  classmethod de_json(data, bot=None)

    See `telegram.TelegramObject.de_json()`.