Skip to content

Instantly share code, notes, and snippets.

@pvrego
Last active June 23, 2024 18:49
Show Gist options
  • Save pvrego/2e346674c3abbaa6366dfe86b8488dc9 to your computer and use it in GitHub Desktop.
Save pvrego/2e346674c3abbaa6366dfe86b8488dc9 to your computer and use it in GitHub Desktop.
How to make README.md files with colored texts in Github

Colored text #1

You can use the diff language tag to generate some colored text:

- text in red
+ text in green
! text in orange
# text in gray
@@ text in purple (and bold)@@

However, it adds it as a new line starting with either - + ! # or starts and ends with @@

enter image description here

Placeholders

It's worth mentioning that you can add some colour in a README using a placeholder image service. For example if you wanted to provide a list of colours for reference:

  • #f03c15 #f03c15
  • #c5f015 #c5f015
  • #1589F0 #1589F0 Produces:

#f03c15 #f03c15 #c5f015 #c5f015 #1589F0 #1589F0

Reference : How to add color to Github's README.md file

@lois4801
Copy link

#f03c15 text

@lois4801
Copy link

#f03c15 -text in red

@lois4801
Copy link

! text in orange

@nurwanto-fazz
Copy link

  • test

@Div-develops
Copy link

@@#f03c15 text

@Esmail3576
Copy link

$${\color{red}Welcome \space \color{lightblue}To \space \color{orange}Stackoverflow}$$

@San3-Cod3
Copy link

More of the workarounds and colour ways we had have been restricted even more now and/or removed. So many decent workarounds no longer function... It's criminal...

@fg20-cs
Copy link

fg20-cs commented Oct 11, 2023

#f03c15

@abdelemjidessaid
Copy link

- This text is colored

@abdelemjidessaid
Copy link

+ And this also

@santiismexican
Copy link

  • and this also

@santiismexican
Copy link

++ And

@santiismexican
Copy link

  • this text is green

@trungthanhnguyenn
Copy link

- **WELCOME EVERYONE**

> *a*

@arduino731
Copy link

Welcome To Stackoverflow

huh is this how this color working with two different color

how about this one...

This is light blue text

@arduino731
Copy link

arduino731 commented Dec 18, 2023

$${\color{red}Welcome \space \color{#8cf720}to \space \color{orange}Stackoverflow}$$

@juanisimioli
Copy link

+ And this also

@Leomdpaz
Copy link

Leomdpaz commented Jan 4, 2024

.diff
.- delete this line dot, replace ``` in the another 2 dots and write here
.

@maplepy
Copy link

maplepy commented Jan 24, 2024

$${\color{red}Welcome \space \color{lightblue}To \space \color{orange}Stackoverflow}$$

@WillianBrazF
Copy link

#c5f015 Test

@MilenaSuzumura
Copy link

@@ text in purple (and bold)@@

@dampdigits
Copy link

why don't they add support for colored texts in github's markdown?

@kit2d2alt
Copy link

  • This text is colored

@Dinidu21
Copy link

Welcome to Stackoverflow

@tomsfb
Copy link

tomsfb commented May 27, 2024

$${\color{red}Welcome \space \color{lightblue}To \space \color{orange}Stackoverflow}$$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment