Skip to main content
Version: API v2 Preview

Color

Kind: class
Module/package: models
SDK: pdfdancer-client-python 2.0.0

RGB color with optional alpha channel.

Parameters:

  • r: Red component (0-255)
  • g: Green component (0-255)
  • b: Blue component (0-255)
  • a: Alpha component (0-255), default 255 (opaque)

Raises:

  • ValueError: If any component is outside 0-255.

Example:

red = Color(255, 0, 0)
semi_transparent_black = Color(0, 0, 0, a=128)

Declaration

Color(r: int, g: int, b: int, a: int = 255) -> None

Members

__init__

__init__(self, r: int, g: int, b: int, a: int = 255) -> None

Initialize self. See help(type(self)) for accurate signature.

View source at af2a1171a1b9