textual: Command palette modal makes data table zebra stripes the wrong color in light mode

Run python docs/examples/widgets/data_table_cursors.py from a repo clone, and use the command palette to switch to light mode:

image

Then open the command palette, and while the modal is displayed note that the zebra stripes change colors past the last column containing data (to lilac or light purple):

image

This doesn’t seem to happen in a dark mode theme:

image

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

Well, let’s set aside the question of whether Textual should be enabling true color mode for my terminal or not, and focus on whether Textual’s behavior is right or wrong when 256-color mode is being used instead of true color mode.

This is what I was hinting in my post before last, I think you make some good points. But I’m not a maintainer of Textual, just an ~annoying hanger-on~ eager contributor, so I think I should bow out here.

Perhaps you could try export COLORTERM=truecolor?

That does make what I see match your screenshot.

Presumably also this is due to 256-color limitations and looks fine on terminals with true color support.

I would suspect this is a ModalScreen effect, not really the CommandPalette specifically.