Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ansi named colors #462

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Misterio77
Copy link

Hey!

I frequently change my terminal colors, and setting RGB colors for my todo folders often leads to unreadable text.

I thought it would be nice to offer an option for setting one of the usual 16 terminal colors, in addition to the 24-bit rgb ones. So, i've added support for them.

It works for all the 16 ansi colors (including the 8 bright ones).

This possibly fixes #297

Here's how it looks like (using dracula scheme, and colors red, cyan, and bright purple (which my terminal renders as bold purple) for the folders):
image

Copy link
Member

@WhyNotHugo WhyNotHugo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've mixed feelings here. I like the idea, but this breaks compat with the vdir format. Two actual issues are:

  1. vdirsycner syncs this to CalDav servers. I'm not entirely sure they support this format. It might be worth just trying, but if it doesn't work syncing to servers and other clients, that'd be a dealbreaker.
  2. khal will fail to parse these and stop showing colours. I use khal myself, and other todoman users do too. Parallel support in khal could be required.

todoman/formatters.py Outdated Show resolved Hide resolved
todoman/formatters.py Show resolved Hide resolved
@Misterio77
Copy link
Author

Thanks for the feedback.

I wasn't aware the color setting was something standardized. I guess my provider doesn't support syncing colors.

Khal has a config option for manually setting colors, so I guess something similar could be implemented here, would that make sense?

Co-authored-by: Hugo Osvaldo Barrera <hugo@barrera.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document that list colors need a compatible terminal
2 participants