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

No longer possible to color text in Markdown #369

Closed
peterflynn opened this issue Sep 17, 2014 · 87 comments
Closed

No longer possible to color text in Markdown #369

peterflynn opened this issue Sep 17, 2014 · 87 comments

Comments

@peterflynn
Copy link

Earlier, GFM allowed you to create colored text this way:
<font color="red">Status: **Not yet implemented**</font>

That used to work. But at some point the <font> tag was removed from the HTML sanitization whitelist.

I suppose it got removed because it's deprecated in HTML5. (Aside: the color attribute is still on the whitelist. Should it be removed too? As far as I know, there's no other HTML tag it can be used on...)

So, can we have a new supported way of coloring text in sanitized GFM now?

Here's one possibility: allow a very strict use of style for setting colors. Only attributes that exactly match the form style="color: #xxxxxx" would be permitted. For something as constrained as that, you could enforce it with a simple regexp like ^color:\s*#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$.

@bkeepers
Copy link
Contributor

Thanks for the request. This gem only handles markup to HTML conversion, but I've logged your feature request for our design team to consider.

@nogweii
Copy link

nogweii commented Dec 2, 2014

Any news on this? Has there been a decision? Hopefully, this will be supported. 😃

@perlygatekeeper
Copy link

I second that opinion. Actually and way to color text would be great.

@bertenator
Copy link

Third!

@chuckh
Copy link

chuckh commented Apr 8, 2015

Fourth.

@JpotatO
Copy link

JpotatO commented Jul 19, 2015

Me too I support this feature, it can be great to at last color the text, but using style="" to set the colors is better for me, I normaly use with <em></em>,<strong></strong>, <u></u>, <s></s>… well mainly text format', or in <blockquotes> too, but it don't work on github…

Adding a way to add a background color can be great too, when I make <table></table> it can be hard to easily see the entries and separators <th></th>.

@amnotafraid
Copy link

Yes, please!

I like to write color-coded documentation. When I document a complicated set of instructions, I like to put a list of the parameters that are needed at the beginning and then give each parameter it's own color.

@paulnakroshis
Copy link

Plus, for commenting student jupyter notebooks, it would be awesome to write my comments in color.

@bala-sridaran
Copy link

I agree that we have to have the color tags back.

@paulnakroshis
Copy link

paulnakroshis commented Feb 16, 2017 via email

@JarrettBillingsley
Copy link

@paulnakroshis really? I can't use that at all.. the style attribute is disallowed.

@SnchitGrover
Copy link

+1

1 similar comment
@sunlee-newyork
Copy link

+1

@ludzzz
Copy link

ludzzz commented Aug 17, 2017

No news about this request ?
GFM won't get colorized text anymore?

@cklie
Copy link

cklie commented Dec 5, 2017

+1

@Narvey
Copy link

Narvey commented Dec 12, 2017

@cklie etc: You guys are commenting on a closed issue, which won't do any good. This is also the wrong repo.

The relevant issue to support would be html-pipeline#287, as that is the repo that actually does the HTML filtering.

EDIT: this is incorrect, see below.

@Khalilsqu
Copy link

please color

@E3V3A
Copy link

E3V3A commented Mar 2, 2018

@Narvey

You guys are commenting on a closed issue, which won't do any good. This is also the wrong repo.

  1. Why did you close it, if it is not resolved?
  2. The issue you linked, refer back to you guys as using a "different whitelist".
  3. THIS is the github repo, so why do you say it's wrong??

@Narvey
Copy link

Narvey commented Mar 2, 2018

@E3V3A I was wrong about the other repo, I read that this filtering was done elsewhere, but either that was wrong to begin with, or has changed since 2015.

I have no idea why it was closed. @bkeepers, is there a Trello board or something else that this is being tracked on, or should we reopen it here?

@tecz
Copy link

tecz commented May 7, 2018

Four years later--is there still no way to color text in a GitHub readme or some sort of whitelist of what's allowed so I can at least try to hack together a solution?

Filtering out certain HTML/CSS attributes is completely understandable, but I have a few projects with use-cases involving the ability to change the font size and font color in a few readme files. Is this ever going to be possible, or do I need to look into utilizing another tool to accomplish this?

README.md files on GitHub can be so incredibly convenient to use, but it always feels like there's something I need that the web interface makes weirdly impossible to do (e.g. color text, print a README file without all of the chrome)...

@didix21
Copy link

didix21 commented May 8, 2018

I do not understand why text color is not possible on github when so many people is demanding it...

@patheticcockroach
Copy link

I remember 20 years ago in basic HTML we could already have colors on the Internet. This is so modern. 🙄

@tecz
Copy link

tecz commented May 8, 2018

GitHub is such an awesome service, but it's easy working somewhere like GitHub to forget that a lot of the rest of us are stuck working with managers who will specifically ask "this documentation is great, but can you make that text red?" or "how do I print this readme without all of the other crap on it?"

@JarrettBillingsley
Copy link

I eventually gave up and decided to use GH pages + jekyll. It's great, and multimarkdown is even better than GFM.

@akskuchi
Copy link

akskuchi commented Jun 1, 2018

this would totally be a killer feature! would be great if it is prioritized

@bogdanpolak
Copy link

bogdanpolak commented Jun 27, 2018

+1 for: <span style=“color:red;”> text </span>

@alec42
Copy link

alec42 commented Sep 3, 2020

+1 Please add colours

@volkantash
Copy link

As a workaround, you guys can use something like this ⬇️
![#FF0000](https://placehold.it/15/FF0000/000000?text=+)

It will display this:
#FF0000 #FF0000

My work. Thanks. 💯

■ ■ ■
■ ■ ■ ■
■■■■■
■
■■■■■

@baryluk
Copy link

baryluk commented Jan 7, 2021

I would love color support in text too, I have a command line utility that utilizes ANSI color for terminal output, and it is a main feature of it, as it without it is less usable. And to showcase it in README.md properly, I need to put a screenshot, which is silly a bit.

screenshot

Having it be a text, would make it easier to update it automatically on code changes, make it more accessible, response to background color changes better, and probably make it be a little more SEO / search friendly, and make it more friendly on mobile.

@paquinmathieu
Copy link

paquinmathieu commented Jan 28, 2021

hi, so Github, what's up with text color? At least integrate the <span style="color:red"> RED TEXT </span> to work... using the diff option works, but... its not fun to use.

Please

@GiuseppeChillemi
Copy link

Colors are the best thing in life, we don't want a B&W one. Computers had their sad monochrome days, then came the happiness with colors, why going back?

@deelawson11
Copy link

deelawson11 commented Jan 30, 2021 via email

@paquinmathieu
Copy link

paquinmathieu commented Jan 30, 2021

I am so tired of this shit. My hacker uses your website along with his 10 aliases. Can't you get him to stop hacking me. This has been going on for almost 10 yrs. It's actually stalking EU commission wants me to get the local police involved. I don't want to but I guess that's where it is going. His name is Derek Pate but I don't think he uses that name. Just so he stays out of trouble.

wow, you are completely confused. This ain't the support channel. This is about colored github issues. Completely unrelated

@eberamp
Copy link

eberamp commented Feb 3, 2021

Welcome 2021, still no colors...

@EasyG0ing1
Copy link

This is a closed request. Literally, every comment in here for a long time now has fallen upon deaf ears.

I think a new request needs to be opened. Not sure why this one was closed.

@ddopson
Copy link

ddopson commented Feb 15, 2021

Instead of posting +1 here, please add your support to issue #1440.

@teshanshanuka
Copy link

2022 and still waiting... *sigh*

@Adventuresofbot
Copy link

We need colour text plz

@volkantash
Copy link

put in text editor: 8-10 color. No need custom color.

@paquinmathieu
Copy link

this issue is closed. I don't think github staff will be looking at your comments here. I suggest you comment here
#1440

@Adityaadpandey
Copy link

Yes you are right!!!

@magicse
Copy link

magicse commented Mar 4, 2023

2023 and still waiting
#### $\textcolor{red}{\textsf{Color didint work .}}$

$\textcolor{red}{\textsf{Color didint work .}}$

@paquinmathieu
Copy link

dont comment here. Its useless.

this issue is closed. I don't think github staff will be looking at your comments here. I suggest you comment here
#1440

@patheticcockroach
Copy link

dont comment here. Its useless.

this issue is closed. I don't think github staff will be looking at your comments here. I suggest you comment here #1440

Frankly, I don't think commenting in the new issue is of much use either. They just couldn't care less, to stay polite.

@kratofl
Copy link

kratofl commented Aug 11, 2023

2023 and still waiting #### $\textcolor{red}{\textsf{Color didint work .}}$

Well, it does work now xD

@JianqiangDing
Copy link

2023 and still waiting #### $\textcolor{red}{\textsf{Color didint work .}}$

Well, it does work now xD

finally!!!

@Hapaxia
Copy link

Hapaxia commented Nov 16, 2023

2023 and still waiting #### $\textcolor{red}{\textsf{Color didint work .}}$

$\textsf{{\color[rgb]{0.0, 0.0, 1.0}I}{\color[rgb]{0.1, 0.0, 0.9}t~ }{\color[rgb]{0.2, 0.0, 0.8}d}{\color[rgb]{0.3, 0.0, 0.7}o}{\color[rgb]{0.4, 0.0, 0.6}e}{\color[rgb]{0.5, 0.0, 0.5}s~ }{\color[rgb]{0.6, 0.0, 0.4}n}{\color[rgb]{0.7, 0.0, 0.3}o}{\color[rgb]{0.8, 0.0, 0.2}w}{\color[rgb]{0.9, 0.0, 0.1}!}{\color[rgb]{1.0, 0.0, 0.0}!}}$

Note, however, that it's still unselectable or searchable as text.

@kunalspathak
Copy link

kunalspathak commented Jan 8, 2024

Looks like, this turns off the syntax highlighting in <details>

$\textcolor{red}{\textsf{Colored summary}}$
- old line
+ new line

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