Can't get colors to print... #5419
-
Clap 4.5.3 I've tried for a couple of days now and haven't been able to get colors to print in help. I've scoured the internets and issues/discussions in this repo and the most promising solution for v4 seems to be something like this stackoverflow -- I've tried this and several other variants, but alas... no color. And yes, colors do work fine in my terminal as I'm printing colors elsewhere 😄 I'm using fn styles() -> Styles {
Styles::styled()
.header(AnsiColor::Red.on_default() | Effects::BOLD)
.usage(AnsiColor::Red.on_default() | Effects::BOLD)
.literal(AnsiColor::Blue.on_default() | Effects::BOLD)
.placeholder(AnsiColor::Green.on_default())
} I've also tried both Is there something I'm blatantly missing? Examples are a little short in this area it feels.. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Could you provide a reproduction case? |
Beta Was this translation helpful? Give feedback.
-
Sure -- reproduction repo here. I'm probably missing something silly... |
Beta Was this translation helpful? Give feedback.
Note that the following works:
To better understand why that works but it doesn't work in your case, let me create a middle ground. The above is almost but not quite