Color

class Varwin.Color
class Varwin.Color(r: float, g: float, b: float, a: float)

Bases: object

Represents a color with red, green, blue, and alpha components. All components are floats in the range 0.0 to 1.0 (inclusive).

R: float
G: float
B: float
A: float
static FromHex(hex: str) Color

Creates a color from a hex string representation.

Example:

result = Varwin.Color.FromHex("text")
static GetRandom() Color

Creates a Color object with random RGB values.

Example:

result = Varwin.Color.GetRandom()
static Lerp(a: Color, b: Color, t: float) Color

Performs linear interpolation between two colors.

Example:

result = Varwin.Color.Lerp(Varwin.Color(1,1,0,1), Varwin.Color(1,1,0,1), 0)