summaryrefslogtreecommitdiff
path: root/doc/user/markdown.md
diff options
context:
space:
mode:
authorTony Rom <thetonyrom@gmail.com>2017-12-20 14:39:40 +0300
committerTony Rom <thetonyrom@gmail.com>2018-01-29 17:39:19 +0300
commitd90d141c24228b8df6333b03d26a1723480837ba (patch)
tree008dd759ae827d3d2b0a3320efa4866fec655980 /doc/user/markdown.md
parent501d81c523b2cf53128e62ea2d7c4dff6681928d (diff)
downloadgitlab-ce-d90d141c24228b8df6333b03d26a1723480837ba.tar.gz
Add Colors to GitLab Flavored Markdown
Diffstat (limited to 'doc/user/markdown.md')
-rw-r--r--doc/user/markdown.md41
1 files changed, 40 insertions, 1 deletions
diff --git a/doc/user/markdown.md b/doc/user/markdown.md
index 552abac747b..b590dfa0d40 100644
--- a/doc/user/markdown.md
+++ b/doc/user/markdown.md
@@ -253,7 +253,7 @@ GFM will recognize the following:
| `@user_name` | specific user |
| `@group_name` | specific group |
| `@all` | entire team |
-| `#123` | issue |
+| `#12345` | issue |
| `!123` | merge request |
| `$123` | snippet |
| `~123` | label by ID |
@@ -379,6 +379,45 @@ _Be advised that KaTeX only supports a [subset][katex-subset] of LaTeX._
>**Note:**
This also works for the asciidoctor `:stem: latexmath`. For details see the [asciidoctor user manual][asciidoctor-manual].
+### Colors
+
+> If this is not rendered correctly, see
+https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#colors
+
+It is possible to have color written in HEX, RGB or HSL format rendered with a color indicator.
+
+Color written inside backticks will be followed by a color "chip".
+
+Examples:
+
+ `#F00`
+ `#F00A`
+ `#FF0000`
+ `#FF0000AA`
+ `RGB(0,255,0)`
+ `RGB(0%,100%,0%)`
+ `RGBA(0,255,0,0.7)`
+ `HSL(540,70%,50%)`
+ `HSLA(540,70%,50%,0.7)`
+
+Becomes:
+
+`#F00`
+`#F00A`
+`#FF0000`
+`#FF0000AA`
+`RGB(0,255,0)`
+`RGB(0%,100%,0%)`
+`RGBA(0,255,0,0.7)`
+`HSL(540,70%,50%)`
+`HSLA(540,70%,50%,0.7)`
+
+#### Supported formats:
+
+* HEX: `` `#RGB[A]` `` or `` `#RRGGBB[AA]` ``
+* RGB: `` `RGB[A](R, G, B[, A])` ``
+* HSL: `` `HSL[A](H, S, L[, A])` ``
+
### Mermaid
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15107) in