diff --git a/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md b/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md index 1e5ff92d5119..a04823d2457b 100644 --- a/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md +++ b/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md @@ -120,6 +120,19 @@ You can display an image by adding ! and wrapping the alt text in `[ {% tip %} +**Tip:** You can append `#gh_color_mode=light` or `#gh_color_mode=dark` to a githubusercontent.com hosted image to only show it while the user is using the respective mode. + +{% endtip %} + +Here are some examples for using gh_color_mode to display the image only in respective mode. + +| Context | URL | +|--------|--------| +| Dark Mode | `![GitHub Light](https://github.com/github-light.png#gh_color_mode=dark)` | +| Light Mode | `![GitHub Dark](https://github.com/github-dark.png#gh_color_mode=light)` | + +{% tip %} + **Tip:** When you want to display an image which is in your repository, you should use relative links instead of absolute links. {% endtip %}