How to color text in Markdown/Gitlab

Viewed 7707

I'm trying color text in markdown. In preview all looks good, but when i push it to repository the text is not colored. How can I color text?

In his beard lived three <span style="color:red">cardinals</span>.

enter image description here

2 Answers

You could try this it seems that Gitlab renders it pretty nice, hope it helps:

$`\textcolor{red}{\text{your text}}`$ 
$`\textcolor{blue}{\text{your text}}`$ 
$`\textcolor{green}{\text{your text}}`$ 

Also there's diff fence:

```diff
- RED text
+ GREEN text
! ORANGE text
# GRAY text
```

enter image description here

Unfortunately most of the HTML hacks for doing color in Markdown will be nullified by GitLab's presentation layer.

GitLab's inline diffs will work for Markdown displayed by GitLab in Issues, Wikis, and by the Markdown Preview.

It supports [- red text -] and [+ green text +] but no others.

Related