question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add background color support

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
khalidabuhakmehcommented, Feb 18, 2018

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

0reactions
khalidabuhakmehcommented, Dec 11, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add, change, or delete the background color in Word
Change the background color · Go to Design > Page Color. · Choose the color you want. If you don't see the color...
Read more >
Change Your Site's Background
Background Colors ​​ Navigate to Appearance → Customize. Click on the Colors & Backgrounds tab. If you don't see Colors & Backgrounds under...
Read more >
Add or change the background color of cells
Select the cells you want to highlight. Tips: To use a different background color for the whole worksheet, click the Select All button....
Read more >
Block Supports | Block Editor Handbook
A lot of blocks, including core blocks, offer similar customization options. Whether that is to change the background color, text color, or to...
Read more >
Gutenberg Block Supports: How to set a default ...
This part works: The Block Supports background color picker appears as expected and I can set the background color for my block as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found