markup
markup copied to clipboard
Color text in markdown
@bkeepers : FYI people are continually asking for coloured text in this closed issue:
https://github.com/github/markup/issues/369
Hi, thank you for starting this new issue. I would absolutely appreciate that feature. Thank you
+1000, which is a roughly accurate summation of six years worth of continuous +1 posts on issue #369, most of which weren't noticed due to that issue being closed for most of that time. (I'm exaggerating only slightly; the real number is 76 posts)
Please fix this and sunset one of my most popular StackOverflow questions (another +358 upvotes and counting): https://stackoverflow.com/questions/11509830/how-to-add-color-to-githubs-readme-md-file
Color is an important design feature for many CLI tools, including my underscore-cli tool for hacking on JSON data, and thus, it's important to be able to include properly colored output examples in the documentation.
Currently, the ONLY way to accomplish this is with a screenshot:

Screenshots are inferior to natively colored text. Beyond the minor inconveniences of being cumbersome to create / edit / maintain, and slower for browsers to load, screenshots thwart readers from copy/pasting key snippets of text, such as the command that was executed in the screenshot -- this makes the documentation less usable, and the potential work-arounds are all very ugly.
Another use-case from issue #369: There's a reason you support auto-colorization of code blocks --- coloring text is crucial for facilitating our eyes to parse it faster. However, there's no fallback story for tail languages and other structured text formats that aren't in your list.
Many, many projects would benefit from being able to tastefully color the structured text in their documentation.
I am here to add my support to colorization in Markdown. Colors are an essential part of communication and we are in 2021, not in 1981 with monochrome displays.
+2147483647, we need this to happen!
Please, make colors happen!
It is crucial indeed! It's been 7 years for god's sake...
One of examples where color text in markdown is useful is Terraform plan reviews.
Consider attaching Terraform plan into GitHub tickets, issues or pull requests. Having TF plan is useful, makes it easier to review pull request, but.. it is plan text, no colors at all.
You can abuse the support for diff. I pipe it through this function (zsh/osx):
format_plan () {
awk '
/Terraform will perform the following actions:/ { found=1 }
/------------------------------------------------------------------------/ { found=0 }
// { if (found) { print $0 } }
' | (
printf '<details><summary>Plan for %s</summary>\n\n```diff\n\n' "$1" && perl -pe 's/\x1b\[[0-9;]*[mG]//g' | sed -e 's/^\( *\)\([\+-]\)/\2\1/' -e 's/^\( *\)~/!\1/' && printf '```\n</details>'
) | pbcopy
}
At least, GitHub could create a custom attribute (<span data-color="red">Red</span>) for example. This would be great as you don't have to use style attributes anymore anymore. It would be easy to style these with some javascript.
Recap of two ~hacks~ methods provided to do this
Images

Diffs
```diff
+ Green
- Red
! Orange
@@ Pink @@
# Gray
...
It's okay but no inline text I guess
And we also have those symbols. but we can disguise them by doing + Green + instead of + Green for example
Idk what GitHub is waiting for, all IDE's I use support coloring in MarkDown..
The hacks described above "work", but should really not be considered as a "fix". The solution is way too dirty for that...
It's 2021 guys, we'd like some proper
+ C +
- O -
! L !
@@ O @@
# R #
S
please! :pray:
Damn, I am surprised at how many people have been asking for color to be implemented into the GitHub markdown preview, and how long they have been asking for it w/o reply. When a company is new, they are so quick to cater to a customers needs, but when they get big like GitHub did, they can honestly care less. Its not that I think they should insert color into there markdown engine, but at the very least give a quick one liner reason as to why they won't implement color into MD rendering engine.
If I had to guess as to why they don't implement color, I would say it is because, they are the only one with black and white text & oversized headers. There markdown, generates a README view that is unique onto GitHub. Any of us can look at a dot MD document on GitHub, and know we are reading something in a GitHub repository. It is so unique and custom, that I see editor extensions that generate markdown in the same format as GitHub does. There MarkDown is a unique trademark of there site. Which makes since because I know that, (75% ) or more, of the time I spend in GitHub, is in my own, or someone else's, README.md documents. I believe they are MS now, which are like the contemporary marketing gurus.
EDIT: Just wanted to point out that using something like + some-text + - some-text - # some-text # * some-text *
wont work because most of the syntax you are suggesting is already being implemented in Markdown. You need something unused like:
$[1] SumText $
Where 1 equals a set of numbers ex(1-8) or (1-4) or whatever... each number is a different color. It would take some ingenuity to implement. Many of the commonly used shorthand's are alreadt being implemented in contemporary markdown.
Could you please some support for colored text in markdown?
Yes color is important part of communication particularly if you are working on visual components. Please make it possible.
Yes, colors please.
colors would be useful when discussing e.g. the output of RSpec, which uses colors a lot.
Gosh Darn it GitHub, life is no fun without color! Please don't make us read black & white documentation for another 5 years. Give us something to zest our README docs up with. GitHub Markdown feels very archaic, quite honestly, visiting a GitHub README.md doc reminds me of watching I Luv Lucy, except I Luv Lucy was funny at least! Or, actually i just remembered that I Luv Lucy Wasn't funny, but you get the point. GitHub Docs needs color, please give us color, so GitHub stops looking like a 1950's throwback website from an alternate reality where the internet was invented 50 years earlier.
Doesn't have to be HTML tags, you are industry leaders if you think some other option is better. Just set the standard, I'm sure everyone is happy as long as we get colors 😃
maybe a custom extension to the markup language, that makes it possible to use different colors for light/dark/dimmed mode
I need gray colored text to quickly differentiate from author's text and text left in issue/pull request template. Example: https://github.com/ClickHouse/ClickHouse/pull/26897
The text
By adding documentation, you'll allow users to try your new feature immediately, not when someone else will have time to document it later. Documentation is necessary for all features that affect user experience in any way. You can add brief documentation draft above, or add documentation right into your patch as Markdown files in docs folder.
has to have gray color.
PS. Maybe I will simply use quotation for that purpose.
It's already 2021 and Github still insists on ignoring colors.
Why
give me colors or give me death
This makes me so sad that a feature which is one of the most basic features in any IDE/ is getting no love from Microsoft/github...
Does GitHub not want to add colors, or is it more of a technical or resource issue?
@Github should Hoist the colours like a true pirate.
Can we can an answer to this issue please?
It's already 2021 and Github still insists on ignoring colors.
"Already 2021"? I see you're also feeling this:

It would be very nice feature to have !
I think GitHub could allow adding classes ({.class#id}), and then style those classes as necessary. This could allow us to add colored text via text {.red}, and this could open doors for a whole lot of stuff (## h2 {.important}, | Table | Header | {.striped},  {.centered}, [link](link) {.button}, text {.font-handwriting})
Common, Github! Consider started an official campaign for
LET MARKDOWN COLORS HAPPEN!
React to this to call their attention!
- Colors please! -
- Colors please! -
+( Just give us colors! )+
+( Just give us colors! )+