'Get the user-selected color theme in Github README

Is it possible to get the user-selected color theme in Github README?

With the possibility of choosing a dark or light theme on Github, it would be useful to show figures on the README file (and other markdowns) accordingly. For instance, if the dark theme is chosen, show a bright version of a figure, and if the light theme is chosen, show a dark version of the figure.



Solution 1:[1]

Isn't not possible.

Normally this sort of thing would be done easily with a few lines of CSS or perhaps some Javascript. However, for security reasons GitHub will not allow any user provided CSS or JavaScript on its site. Whatever you include in your Markdown files will be stripped out by GitHub's sanitizer as documented in step 2 at github/markup:

  1. The HTML is sanitized, aggressively removing things that could harm you and your kin—such as script tags, inline-styles, and class or id attributes.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Waylan