Color
arabic_animations.core.color.Color
dataclass
Color class supporting multiple formats and alpha channel Values are stored internally as RGB (0-1 range)
Source code in arabic_animations/core/color.py
darken(amount)
from_hex(hex_color)
classmethod
Create from hex string (#RRGGBB or #RRGGBBAA)
Source code in arabic_animations/core/color.py
from_hsl(h, s, l, a=1.0)
classmethod
Create from HSL values (H: 0-360, S: 0-1, L: 0-1)
from_hsv(h, s, v, a=1.0)
classmethod
Create from HSV values (H: 0-360, S: 0-1, V: 0-1)
from_rgb(r, g, b, a=1.0)
classmethod
from_rgb255(r, g, b, a=1.0)
classmethod
lighten(amount)
to_hex()
Get hex string
to_hsl()
to_hsv()
to_rgb()
to_rgb255()
arabic_animations.core.color.Style
dataclass
Text styling options
Source code in arabic_animations/core/color.py
Usage Examples
Creating Colors
from arabic_animations.core.color import Color, Colors
# From RGB (0-1)
red = Color.from_rgb(1.0, 0.0, 0.0)
# From RGB (0-255)
blue = Color.from_rgb255(0, 0, 255)
# From hex
gold = Color.from_hex("#FFD700")
# From HSL
green = Color.from_hsl(120, 1.0, 0.5)
Using Predefined Colors
# Basic colors
black = Colors.BLACK
white = Colors.WHITE
# UI colors
primary = Colors.PRIMARY
warning = Colors.WARNING
# Paper colors
background = Colors.PAPER_CREAM