Closed gianlucazhang2 closed 1 month ago
This pull request refactors the svg_class.py
file by removing the color-related classes and functions, and importing a Color
class from a separate color_class.py
file. The changes simplify the file structure and improve code organization by separating color-related functionality into its own module.
classDiagram
class Color {
+rgba: _RGBA
+hsla: _HSLA
+from_rgba(r: int, g: int, b: int, a: int): Color
+from_hex(hex: str): Color
+to_hex_argb(): str
+to_svg_tiny_color_format(): str
+lighten(factor: float): Color
+darken(factor: float): Color
+transparent(factor: float): Color
}
class _RGBA {
-r: int
-g: int
-b: int
-a: float
}
class _HSLA {
-h: int
-s: float
-l: float
-a: float
}
Color --> _RGBA
Color --> _HSLA
Change | Details | Files |
---|---|---|
Removed color-related classes and functions |
|
src/svg_class.py |
Imported Color class from a separate module |
|
src/svg_class.py |
Simplified file structure |
|
src/svg_class.py |
Summary by Sourcery
Enhancements: