Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lunatic-fox/gh-tags
An API to get a tag based on Github language colors.
https://github.com/lunatic-fox/gh-tags
api colors github image linguist markdown nodejs serveless svg tag vercel
Last synced: 21 days ago
JSON representation
An API to get a tag based on Github language colors.
- Host: GitHub
- URL: https://github.com/lunatic-fox/gh-tags
- Owner: lunatic-fox
- License: mit
- Created: 2022-02-14T20:50:39.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-02T05:05:11.000Z (almost 2 years ago)
- Last Synced: 2024-10-04T18:41:26.506Z (about 1 month ago)
- Topics: api, colors, github, image, linguist, markdown, nodejs, serveless, svg, tag, vercel
- Language: JavaScript
- Homepage: https://gh-tags.vercel.app/
- Size: 156 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
GitHub Tags
**[Português do Brasil](./docs/pt-br/README.md)**[🔸 GitHub Tags API](#how-main)
[🔸 GitHub Colors API](#how-use)## Summary
[🔸 GitHub Tags API](#how-main)
[🔹 How to use](#how)
[🔹 Language name special symbols](#lang)
[🔹 Customization](#cust)
[🔹 Non colored languages](#non)
[🔸 GitHub Colors API](#how-use)
[🔹 How to use](#how-h-use)
[🔸 Libraries](#lib)🔸 GitHub Tags API
🔹 How to use
Use the ***[GitHub Tags GUI](https://gh-tags.vercel.app/)*** to generate your link or copy and paste the template URL below:
~~~
https://gh-tags.vercel.app/api?lang=[LANGUAGE NAME]
~~~Then replace the value of `lang=[LANGUAGE NAME]` to any language known by Github.
***[📃 Reference list of all languages known by Github](./docs/list/README.md)***
Let's see some examples:
***Markdown***
~~~markdown
![Markdown](https://gh-tags.vercel.app/api?lang=markdown)
~~~
**Response:** ![Markdown](https://gh-tags.vercel.app/api?lang=markdown)
***HTML***
~~~html
~~~
**Response:**
🔹 Language name special symbols
Some language names have `space`, `+`, `#` or `*`. In those cases they are replaced by those symbols:
- `space` > `-`
*e.g.: `Regular expression` > `regular-expression`* ![](https://gh-tags.vercel.app/api?lang=regular-expression&type=squared&size=small)
- `+` > `-plus`
*e.g.: `C++` > `c-plus-plus`* ![](https://gh-tags.vercel.app/api?lang=c-plus-plus&type=squared&size=small)
- `#` > `-sharp`
*e.g.: `C#` > `c-sharp`* ![](https://gh-tags.vercel.app/api?lang=c-sharp&type=squared&size=small)
- `*` > `-asterisk`
*e.g.: `F*` > `f-asterisk`* ![](https://gh-tags.vercel.app/api?lang=f-asterisk&type=squared&size=small)
🔹 Customization
There are some options to the output tag listed here:
- `size=small` - This is the small version of tag. (height: 20px) - Default height: 32px.
- `type=squared` - This is the squared box version of tag. - Default version: rounded.All the options can be added by putting a `&` before the chosen option. Let's see some examples:
***JavaScript - small version***
~~~markdown
![JavaScript](https://gh-tags.vercel.app/api?lang=javascript&size=small)
~~~
**Response:** ![JavaScript](https://gh-tags.vercel.app/api?lang=javascript&size=small)
***JavaScript - squared version***
~~~markdown
![JavaScript](https://gh-tags.vercel.app/api?lang=javascript&type=squared)
~~~
**Response:** ![JavaScript](https://gh-tags.vercel.app/api?lang=javascript&type=squared)
***JavaScript - small squared version***
~~~markdown
![JavaScript](https://gh-tags.vercel.app/api?lang=javascript&size=small&type=squared)
~~~
**Response:** ![JavaScript](https://gh-tags.vercel.app/api?lang=javascript&size=small&type=squared)
🔹 Non colored languages
There are some languages without a specific color and they will be presented that way.
![](https://gh-tags.vercel.app/api?lang=cobol) ![](https://gh-tags.vercel.app/api?lang=robots.txt&type=squared) ![](https://gh-tags.vercel.app/api?lang=asl&size=small) ![](https://gh-tags.vercel.app/api?lang=limbo&size=small&type=squared)
🔸 GitHub Colors API
🔹 How to use
Use this template URL below:
~~~
https://gh-tags.vercel.app/use?lang=[LANGUAGE NAME]
~~~
Then replace the value of `lang=[LANGUAGE NAME]` to any language known by Github.### **⚠**
### **Differently from GitHub Tags API this API route returns only JSON objects!**
***[📃 Reference list of all languages known by Github](./docs/list/README.md)***
Let's see some examples:
***Ada***
~~~
https://gh-tags.vercel.app/use?lang=ada
~~~
***returns:***
~~~json
{"lang":"ada","name":"Ada","color":"#02f88c"}
~~~
---
***Json***
~~~
https://gh-tags.vercel.app/use?lang=json
~~~
***returns:***
~~~json
{"lang":"json","name":"JSON","color":"#292929"}
~~~
🔸 Libraries
Look those amazing libraries used in this project!
📕 ***[@vercel/node](https://vercel.com/docs/runtimes)***
📕 ***[axios](https://github.com/axios/axios)***
📕 ***[text-to-svg](https://www.npmjs.com/package/text-to-svg)***
📕 ***[yaml](https://www.npmjs.com/package/yaml)***
![](./docs/img/powered-by-vercel.svg)