Tweak GitHub Icon

Tweak the icon of GitHub's website into white color & transparent background for better contrast on dark tab backgrounds etc. , especially for dark-themed Firefox. White, dark and black colors as well as white, dark, black and transparent backgrounds are all predifined in case of you need to modify them. Require SVG icon support.

目前為 2019-11-19 提交的版本,檢視 最新版本

作者
Crystal-RainSlide
評價
0 0 0
版本
1.0
建立日期
2019-11-19
更新日期
2019-11-19
尺寸
2.3 KB
授權條款
未知
腳本執行於

How to change the color and background

Use those predifined varibles:

white_color
dark_color
black_color

white_background
dark_background
black_background
transparent_background

to replace the two arguments inside the function in the right side of the euqal sign at the end of this script:

  document.head.querySelector('[rel="icon"]').href = getSVGDataURL( white_color, transparent_background );

And done.


For example, if we want black color and white background:

  document.head.querySelector('[rel="icon"]').href = getSVGDataURL( black_color, white_background);

SVG source code based on https://github.githubassets.com/pinned-octocat.svg , all the rights belong to GitHub.Inc .

The so called "dark color" is #191717 #191717 in the link above.

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址