Skip to content

Instantly share code, notes, and snippets.

@annibal
Created March 28, 2024 21:40
Show Gist options
  • Save annibal/e8c3fc3c48020d110af549585e3086c6 to your computer and use it in GitHub Desktop.
Save annibal/e8c3fc3c48020d110af549585e3086c6 to your computer and use it in GitHub Desktop.
Colored Tags in GitHub Markdown

Using place-hold.it

  • image Task is Yet To Start
  • image Work In Progress
  • image Pull Request in Review
  • image Merged
  • image Blocked by some kind of issue

Syntax:

![image](https://place-hold.it/WIDTHxHEIGHT/BGCOLOR/COLOR&fontsize=FONTSIZE&bold&text=TEXT)

where WIDTH, HEIGHT and FONTSIZE are numbers, and BGCOLOR and COLOR are six-characters hex colors.

"&bold" is optional.

Example:

![image](https://place-hold.it/50x13/34495e/ffffff&fontsize=8&bold&text=TASK)

Using MathJax / LaTeX / Tex

  • $\large\color{#34495e} \tt{[} \mathmakebox[4em][c]{\tt{TASK}} \tt{]}$ Task is Yet To Start
  • $\large\color{#d35400} \tt{[} \mathmakebox[4em][c]{\tt{WIP}} \tt{]}$ Work In Progress
  • $\large\color{#8e44ad} \tt{[} \mathmakebox[4em][c]{\tt{REVIEW}} \tt{]}$ Pull Request in Review
  • $\large\color{#2980b9} \tt{[} \mathmakebox[4em][c]{\tt{MERGED}} \tt{]}$ Merged
  • $\large\color{#c0392b} \tt{[} \mathmakebox[4em][c]{\tt{BLOCK}} \tt{]}$ Blocked by some kind of issue

Syntax:

$\large \color{#COLOR} \tt{[} \mathmakebox[WIDTH][c]{\tt{TEXT}} \tt{]}\$

where COLOR is a six-character hex color, WIDTH is a number followed by the unit, like em, and TEXT is a string.

\tt{TEXT} formats the text in non-italic, sans-serif, boldish font.

Example:

$\large\color{#34495e}\tt{[}\mathmakebox[4em][c]{\tt{TASK}}\tt{]}$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment