Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonecorsi/github-languages-colors
🎨 This npm package exposes github language colors codes in js, json and css and updates daily from github definitions!
https://github.com/simonecorsi/github-languages-colors
color-scheme colors css github-colors github-languages github-languages-css javascript json npm palette
Last synced: 2 days ago
JSON representation
🎨 This npm package exposes github language colors codes in js, json and css and updates daily from github definitions!
- Host: GitHub
- URL: https://github.com/simonecorsi/github-languages-colors
- Owner: simonecorsi
- License: mit
- Created: 2022-07-27T07:56:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-17T14:18:25.000Z (5 days ago)
- Last Synced: 2024-12-20T00:34:06.683Z (3 days ago)
- Topics: color-scheme, colors, css, github-colors, github-languages, github-languages-css, javascript, json, npm, palette
- Language: CSS
- Homepage:
- Size: 8.01 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# github-languages-colors
- [About](#about)
- [Installation](#installation)
- [Usage](#usage)
- [Javascript/Typescript](#javascripttypescript)
- [JSON](#json)
- [CSS](#css)
- [Contributing](#contributing)
- [License](#license)
- [Contact](#contact)## About
> 🎨 This simple packages exposes github language colors in js, json and css and updates daily from github definitions!
Have you ever needed for your side project to show languages with cool colors like github does? Fear no more, this package exposes them in JS (both CommonJS and ESM), JSON and CSS!
The definitions are updated daily!
## Installation
```sh
npm i --save @scdev/github-languages-colors
# OR
yarn add @scdev/github-languages-colors
```## Usage
### Javascript/Typescript
```js
import ghColors from '@scdev/github-languages-colors';
// OR
const ghColors = require('@scdev/github-languages-colors');
```**NB**: Language are the same as returned from Github APIs and as seen in the website, this to easily retrieve them programmatically, eg: js is JavaScript.
### JSON
There is also a JSON file if you want to use it in other languages in: `src/index.json`
### CSS
**NB**: To maintain original names as stated above we added prefixes to avoid unconventional classNames (eg: starting with numbers)
Two files are generated, so you can include only the one you need:
- [`gh-colors.css`](./src/gh-colors.css)
- [`gh-background.css`](./src/gh-background.css)
- [`gh-variables.css`](./src/gh-variables.css)## Contributing
Project is pretty simple and straight forward for what is my needs, but if you have any idea you're welcome.
This projects uses [commitlint](https://commitlint.js.org/) with Angular configuration so be sure to use standard commit format or PR won't be accepted.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'feat(scope): some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request## License
Distributed under the MIT License. See `LICENSE` for more information.
## Contact
Simone Corsi - [@im_simonecorsi](https://twitter.com/im_simonecorsi)