-
Notifications
You must be signed in to change notification settings - Fork 156
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 background color support #21
Comments
any thoughts on this @khalidabuhakmeh ? |
I would also be interested in something like this. It would also be good to have foreground colour support. |
Feel free to submit a PR. Most changes are welcome and I'll help where I can 😁 |
Unfortunately, people are happy to use code other people wrote, but contributing to it is asking far too much. 😁 |
It's cool, I know folks are busy. I recommend folks check out https://github.com/spectresystems/spectre.console. ConsoleTables was a hobby project. Patrik has definitely done a great job and I've contributed a few ideas there. .NET OSS for the win. :) |
It´d be great if you could add a background color to each row based on some property of the item, that could be defined by a delegate.
For example, you add an overload that accepts a function like this
ConsoleTable.From<Item>(myResults, (item) => { item.Value > 50 ? RowBackground.Red : RowBackground.Green }).Write();
In this case rows that contain items with value bigger than 50 will be printed out with a red background, the rest with a green one.
The text was updated successfully, but these errors were encountered: