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 background color support #21

Closed
sepharg opened this issue May 27, 2017 · 5 comments
Closed

Add background color support #21

sepharg opened this issue May 27, 2017 · 5 comments

Comments

@sepharg
Copy link

sepharg commented May 27, 2017

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.

@sepharg
Copy link
Author

sepharg commented Sep 15, 2017

any thoughts on this @khalidabuhakmeh ?
if you're not able to add this maybe i can collaborate and add it myself if that's ok for you?

@kiran94
Copy link

kiran94 commented Feb 17, 2018

I would also be interested in something like this. It would also be good to have foreground colour support.

@khalidabuhakmeh
Copy link
Owner

Feel free to submit a PR. Most changes are welcome and I'll help where I can 😁

@CerebralMischief
Copy link

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. 😁

@khalidabuhakmeh
Copy link
Owner

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. :)

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

No branches or pull requests

4 participants