khal icon indicating copy to clipboard operation
khal copied to clipboard

24-Bit Truecolor Support

Open AtomToast opened this issue 5 years ago • 0 comments

I am trying to modify the colorscheme of khal and according to the urwid documentation it should be possible to specify any colors with a hex notation http://urwid.org/manual/displayattributes.html#bit-foreground-and-background-colors However when I try to enter a hex value I get this error:

Traceback (most recent call last):
  File "/usr/bin/ikhal", line 5, in <module>
    main_ikhal()
  File "/usr/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/khal/cli.py", line 479, in interactive_cli
    controllers.interactive(
  File "/usr/lib/python3.8/site-packages/khal/controllers.py", line 544, in interactive
    ui.start_pane(
  File "/usr/lib/python3.8/site-packages/khal/ui/__init__.py", line 1313, in start_pane
    loop = urwid.MainLoop(
  File "/usr/lib/python3.8/site-packages/urwid/main_loop.py", line 118, in __init__
    screen.register_palette(palette)
  File "/usr/lib/python3.8/site-packages/urwid/display_common.py", line 856, in register_palette
    self.register_palette_entry(*item)
  File "/usr/lib/python3.8/site-packages/urwid/display_common.py", line 923, in register_palette_entry
    basic = AttrSpec(foreground, background, 16)
  File "/usr/lib/python3.8/site-packages/urwid/display_common.py", line 540, in __init__
    raise AttrSpecError(('foreground/background (%s/%s) require ' +
urwid.display_common.AttrSpecError: foreground/background ('white'/'#383830') require more colors than have been specified (16).

So as far as I can tell khal has limited the colors to be accepted to the 16 standard colors?

I'd appreciate if this limitation could be removed

AtomToast avatar Sep 13 '20 12:09 AtomToast