TTkColorGradient🌶️
- class TTkColorGradient(increment: int | None = None, fgincrement: int = 0, bgincrement: int = 0, orientation: Direction = Direction.VERTICAL)[source]🌶️
Bases:
TTkColorModifierCreate a linear incremental gradient modifier.
- Parameters:
increment (int | None) – shared increment for foreground and background; when provided it overrides
fgincrementandbgincrementfgincrement (int) – foreground incremental step when
incrementis not providedbgincrement (int) – background incremental step when
incrementis not providedorientation (
TTkK.Direction) – gradient direction, eitherTTkK.Direction.VERTICALorTTkK.Direction.HORIZONTAL
Methods🌶️
- copy()[source]🌶️
Return a gradient modifier copy sharing the computed cache.
The returned instance keeps the same increments and orientation, and shares the internal cache to avoid recomputing gradient steps.
- Returns:
copied gradient modifier
- Return type: