I want to color my console text? #355

Closed
opened 2026-01-29 14:34:37 +00:00 by claunia · 3 comments
Owner

Originally created by @Layarion on GitHub (Mar 30, 2020).

I'm using a .net core 3.1 Console App, and I just want to color keywords in my source string from another layer, and have the presentation layer parse the markdown to display colored words.

it's just for normal console text, not html or anything. I'm currently working on my own implementation but would rather not if I don't have to. can I do that with this? I seen that was a .ToHTML piece of code in the readme, is there a like, .ToConsole or .ToValueKeyPairList or something?

Originally created by @Layarion on GitHub (Mar 30, 2020). I'm using a .net core 3.1 Console App, and I just want to color keywords in my source string from another layer, and have the presentation layer parse the markdown to display colored words. it's just for normal console text, not html or anything. I'm currently working on my own implementation but would rather not if I don't have to. can I do that with this? I seen that was a .ToHTML piece of code in the readme, is there a like, .ToConsole or .ToValueKeyPairList or something?
claunia added the question label 2026-01-29 14:34:37 +00:00
Author
Owner

@xoofx commented on GitHub (Mar 30, 2020):

it's just for normal console text, not html or anything. I'm currently working on my own implementation but would rather not if I don't have to. can I do that with this? I seen that was a .ToHTML piece of code in the readme, is there a like, .ToConsole or .ToValueKeyPairList or something?

There is no built-in like this, you need to develop your own renderer.

@xoofx commented on GitHub (Mar 30, 2020): > it's just for normal console text, not html or anything. I'm currently working on my own implementation but would rather not if I don't have to. can I do that with this? I seen that was a .ToHTML piece of code in the readme, is there a like, .ToConsole or .ToValueKeyPairList or something? There is no built-in like this, you need to develop your own renderer.
Author
Owner

@Layarion commented on GitHub (Mar 30, 2020):

If I wanted to pull in a .ToDictionary(string, markdown/color) (no idea if this is best route) using MarkDig, would it be difficult for someone new to programming?

@Layarion commented on GitHub (Mar 30, 2020): If I wanted to pull in a .ToDictionary(string, markdown/color) (no idea if this is best route) using MarkDig, would it be difficult for someone new to programming?
Author
Owner

@xoofx commented on GitHub (Apr 4, 2020):

It is quite some work, Powershell has done a similar work here https://github.com/PowerShell/PowerShell/tree/master/src/Microsoft.PowerShell.MarkdownRender that you could base your work on.

@xoofx commented on GitHub (Apr 4, 2020): It is quite some work, Powershell has done a similar work here https://github.com/PowerShell/PowerShell/tree/master/src/Microsoft.PowerShell.MarkdownRender that you could base your work on.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#355