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

HEX Class. More...

Public Member Functions

def __init__ (self, str hex)
 
def __repr__ (self)
 The string-repr of an Hex-value. More...
 
str __str__ (self)
 The string-repr of an Hex-value. More...
 

Static Public Attributes

list VALID_CHARS = [str(i) for i in range(10)] + ['a', 'b', 'c', 'd', 'e', 'f']
 

Detailed Description

HEX Class.

Represents a validated hexadecimal color value.

The HEX class ensures that only properly formatted hex color strings (e.g. "#ffffff") are accepted. It validates structure and allowed characters on initialization and stores the value in a normalized, immutable form.

Provides string representations for use in UI rendering and configuration.

Constructor & Destructor Documentation

◆ __init__()

def themes.HEX.__init__ (   self,
str  hex 
)

Member Function Documentation

◆ __repr__()

def themes.HEX.__repr__ (   self)

The string-repr of an Hex-value.

◆ __str__()

str themes.HEX.__str__ (   self)

The string-repr of an Hex-value.

Returns
str

Member Data Documentation

◆ VALID_CHARS

list themes.HEX.VALID_CHARS = [str(i) for i in range(10)] + ['a', 'b', 'c', 'd', 'e', 'f']
static

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