shell
pip install urwid
python
style = urwid.AttrSpec('bold underline', 'default', 'dark red')
python
text = urwid.Text(("style", "Hello, World!"))
python
button = urwid.Button("Click Me")
button = urwid.AttrMap(button, "style")
python
class CustomButton(urwid.Button):
def render(self, size, focus=False):
return super().render(size, focus)
ini
[colors]
dark red = #8B0000
default = white
[palettes]
style = dark red, bold, underline
python
urwid.set_encoding("myconfig.ini")
python
urwid.register_palette_entry('mystyle', ('dark red', 'default', 'bold'))