svgen.color package#
Subpackages#
Submodules#
svgen.color.alpha module#
svgen - A module for working with alpha channels for colors.
svgen.color.conversion module#
svgen - A module for converting colors from some form to some other.
svgen.color.hsl module#
svgen - Common interfaces for hsl colors. See also:
- class svgen.color.hsl.Hsl(hue: DegreePrimitive, saturation: PercentPrimitive, lightness: PercentPrimitive, alpha: Alpha = 1.0)[source]#
Bases:
NamedTupleA definition of an hsl color.
- animate(hue: int = None, saturation: float = None, lightness: float = None, alpha: float = None, delta: bool = False) Hsl[source]#
Manipulate this color into a new one.
- arc(hue_count: int = 1, hue_divisor: int = 1, saturation_count: int = 1, saturation_divisor: int = 1, lightness_count: int = 1, lightness_divisor: int = 1) Hsl[source]#
Rotate this angle around the circle.
- hue: DegreePrimitive#
Alias for field number 0
- lightness: PercentPrimitive#
Alias for field number 2
- saturation: PercentPrimitive#
Alias for field number 1
- class svgen.color.hsl.PercentPrimitive(val: int)[source]#
Bases:
int,RotatableA class for integer percentages.
- arc(count: int = 1, divisor: int = 2) PercentPrimitive[source]#
Rotate this angle around the circle.
- property ratio: float#
Get this percentage as a ratio between 0 and 1.
svgen.color.numbers module#
svgen - A module for working with number primitives.
svgen.color.resolve module#
A module for resolving colors.
svgen.color.rgb module#
svgen - Common interfaces for rgb colors. See also:
- class svgen.color.rgb.Rgb(red: RgbPrimitive, green: RgbPrimitive, blue: RgbPrimitive, alpha: Alpha = 1.0)[source]#
Bases:
NamedTupleA definition of an rgb color.
- animate(red: int = None, green: int = None, blue: int = None, alpha: float = None, delta: bool = False) Rgb[source]#
Animate a color.
- blue: RgbPrimitive#
Alias for field number 2
- green: RgbPrimitive#
Alias for field number 1
- red: RgbPrimitive#
Alias for field number 0
- property rgb: str#
Get this color as an ‘rgb’ constructor.
- property rgba: str#
Get this color as an ‘rgba’ constructor.
Module contents#
svgen - A module for working with colors.
- class svgen.color.Color(rgb: Rgb, hsl: Hsl)[source]#
Bases:
NamedTupleA definition of a color.
- animate(hue: int = None, saturation: float = None, lightness: float = None, red: int = None, green: int = None, blue: int = None, alpha: float = None, delta: bool = False) T[source]#
Animate this color based on HSL properties.