The original GitHub proposal is here. It’s rolled out basically everywhere on GitHub now.
Solution One #


For example, this repository uses this technique.
Solution Two #
Directly use html picture tags to switch pictures according to the system theme
<a href="https://gitmaya.com" target="_blank" style="display: block" align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/ConnectAI-E/GitMaya/assets/50035229/45cfd4f3-9c17-44d2-b6b7-3aa97c08006b" width="655" height="auto">
<img alt="Active Contributors of ConnectAI-E/GitMaya - Last 28 days" src="https://github.com/ConnectAI-E/GitMaya/assets/50035229/1c28f0ca-d6e6-4ebd-b858-c4be3eff845e" width="655" height="auto">
</picture>
</a>
This more like a hack, but it works. check outlook in gitmaya.