Skip to content

🎨 This npm package exposes github language colors codes in js, json and css and updates daily from github definitions!

License

Notifications You must be signed in to change notification settings

simonecorsi/github-languages-colors

Repository files navigation

github-languages-colors

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

npm i --save @scdev/github-languages-colors
# OR
yarn add @scdev/github-languages-colors

Usage

Javascript/Typescript

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:

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 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