Skip to content

PyDrocsid.material_colors

MaterialColors

List of all material colors

Source code in PyDrocsid/material_colors.py
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
class MaterialColors:
    """List of all material colors"""

    red = _load_color("red")
    pink = _load_color("pink")
    purple = _load_color("purple")
    deeppurple = _load_color("deeppurple")
    indigo = _load_color("indigo")
    blue = _load_color("blue")
    lightblue = _load_color("lightblue")
    cyan = _load_color("cyan")
    teal = _load_color("teal")
    green = _load_color("green")
    lightgreen = _load_color("lightgreen")
    lime = _load_color("lime")
    yellow = _load_color("yellow")
    amber = _load_color("amber")
    orange = _load_color("orange")
    deeporange = _load_color("deeporange")
    brown = _load_color("brown")
    grey = _load_color("grey")
    bluegrey = _load_color("bluegrey")

    default = teal
    error = red
    warning = yellow[700]

NestedInt

Bases: int

Combination of integer and read only dictionary.

Source code in PyDrocsid/material_colors.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
class NestedInt(int):
    """Combination of integer and read only dictionary."""

    _values: dict[int | str, int]

    def __new__(cls, x: int, values: dict[int | str, int]) -> NestedInt:
        obj = super(NestedInt, cls).__new__(cls, x)
        obj._values = values
        return obj

    def __getitem__(self, key: int | str) -> int:
        return self._values[key]

    def __iter__(self) -> Iterator[int | str]:
        return self._values.__iter__()

    def items(self) -> ItemsView[int | str, int]:
        return self._values.items()

    def __copy__(self) -> int:
        return int(self)

    def __deepcopy__(self, *_: Any) -> int:
        return int(self)