Colorizing text in README.md in Gitlab or provide colorized chit without syntax

I am running gitlab-ce-12.10.6 self-managed on a CentOS 7.8 server. I have finally started uploading projects, creating Wikis, and etcetera.

I would like to be able to set the color of text in my Wiki pages written in markdown(md). I have read that Github seems to offer this, but I cannot find a working example where I can either provide a “chit” of a given color and only that chit without the RGB syntax also displaying or any other means that works for portraying text in red, purple, blue or whatever. I have tried many different formats and they have all displayed the code along with the chit, but not color text or just a chit before the text (sort of like a bullet-marker).

Capture

Hi @warronf!

If the syntax matches what’s documented, it should indeed work on wiki pages as well. Does it work for you within issue descriptions? Please also try this extended syntax.

Thanks for these additional details! Maybe we’ve found a bug here, which we can then report. Alternatively, this could be a feature request for gitlab_kramdown. Not all extensions are support everywhere, yet. I’ll seek to clarify this.

Cheers :slight_smile:

1 Like

I used the following syntax while generating a test Wiki, perhaps this could be different from a README.md??

Sample1 Syntax============
Using: #### Gitlab Orange Heading
{: .gitlab-orange}

image.png

====Sample2 Syntax===========
Using:
#### Test Heading

- `#F00` subtext

========Sample2 output======
image.png

Is there anyone who can provide more advice on this? Perhaps they can test some syntax on their end and then prove that it produces text in a given color inside the README.md file?

Hi Warron! Apologies for the late reply here :-/ This is not possible after all, because:

a) The extended MD syntax is not intended for wikis, or even our own docu, and
b) That color “chip” syntax is intended to show only a representation of the color code, not colorise any part of the document.

I overlooked this before :frowning:

2 Likes

Danka katrin.

This was the feedback I was expecting, albeit I was hoping the feature existed. No problem though, I can work with it as it is.

1 Like

One possible workaround I found was to use colorized latex text inside an inline equation.

Like in the following:

$ `\textcolor{teal}{ \text{ Eq.(3-5) in the main text} } `$

Within an inline equation

$ ` `$

add a colored text block with

\textcolor{ your_color }{ \text{ Your text } }

Example in the readme here: README.md · master · dimitra-maoutsa / ODEs_for_SDEs · GitLab