github-profilinator icon indicating copy to clipboard operation
github-profilinator copied to clipboard

Grammar for importing badge from img.shields.io

Open Z1zs opened this issue 1 year ago • 0 comments

Describe the bug I try to figure out what's the rules of badge URL generated by github-profilinator.com.

To Reproduce The generated URL has a format like

<img src=https://img.shields.io/badge/github-%2324292e.svg?&style=for-the-badge&logo=github&logoColor=white alt=github style="margin-bottom: 5px;" />

, where "2324292e" in "github-%2324292e.svg" is really confusing for me. I suppose it's a hex RGBA color, however when I replace "2324292e" with "232429", it seems that both the color and opacity are changed. Could anyone explain what "2324292e" stands for?

Expected behavior I have checked out the docs of img.shields.io but haven't found a usage like this——They just indicate the logoColor and labelColor by appending them in the URL (like "https://img.shields.io/badge/:badgeContentlogoColor=2324292e&labelColor=2324292e&color=2324292e")

Screenshots

  1. Github's badge URL (with an adiitional 2e):

<img src=https://img.shields.io/badge/github-%2324292e.svg?&style=for-the-badge&logo=github&logoColor=white alt=github style="margin-bottom: 5px;" />

github
  1. Github's badge URL (without 2e): <img src=https://img.shields.io/badge/github-%232429.svg?&style=for-the-badge&logo=github&logoColor=white alt=github style="margin-bottom: 5px;" />
github

Desktop (please complete the following information):

  • OS: windows
  • Browser: chrome

Z1zs avatar Oct 30 '24 19:10 Z1zs