Sudoku Showcase
Public Member Functions | Static Public Attributes | List of all members
themes.RGB Class Reference

Represents a validated RGB color value. More...

Public Member Functions

def __init__ (self, int red, int green, int blue)
 
def __repr__ (self)
 The string-repr of an RGB tuple. More...
 
str __str__ (self)
 The string-repr of an RGB tuple. More...
 
int red (self)
 Returns the value for Red. More...
 
int green (self)
 Returns the value for Green. More...
 
int blue (self)
 Returns the value for Blue. More...
 

Static Public Attributes

int MAX_VALUE = 255
 

Detailed Description

Represents a validated RGB color value.

The RGB class stores a color as three integer components (red, green, blue)
and enforces strict bounds checking (0–255) on initialization.

It provides read-only access to individual color channels and is intended
as a safe, immutable representation of RGB-based UI colors.

Constructor & Destructor Documentation

◆ __init__()

def themes.RGB.__init__ (   self,
int  red,
int  green,
int  blue 
)

Member Function Documentation

◆ __repr__()

def themes.RGB.__repr__ (   self)

The string-repr of an RGB tuple.

Returns
tuple

◆ __str__()

str themes.RGB.__str__ (   self)

The string-repr of an RGB tuple.

Returns
str

◆ blue()

int themes.RGB.blue (   self)

Returns the value for Blue.

Returns
int

◆ green()

int themes.RGB.green (   self)

Returns the value for Green.

Returns
int

◆ red()

int themes.RGB.red (   self)

Returns the value for Red.

Returns
int

Member Data Documentation

◆ MAX_VALUE

int themes.RGB.MAX_VALUE = 255
static

The documentation for this class was generated from the following file: