github-linguist-colours
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

GitHub Linguist Colours

travis npm version

Given a string denoting a programming language, return its corresponding GitHub linguist hex colour:

import { getHexColour, getColourMap } from 'github-linguist-colours';
getHexColour('Swift');

>#ffac45

You can also simply return the underlying object itself if you wish:

getColourMap();
>
  {
  ...
    graphql: '#e10098',
    groovy: '#e69f56',
    html: '#e34c26',
    hack: '#878787',
    haml: '#ece2a9',
    handlebars: '#f7931e',
    harbour: '#0e60e3',
    haskell: '#5e5086',
    haxe: '#df7900',
    hiveql: '#dce200',
    holyc: '#ffefaf',
  ...
  }

Readme

Keywords

none

Package Sidebar

Install

npm i github-linguist-colours

Weekly Downloads

2

Version

1.1.1

License

MIT

Unpacked Size

59.9 kB

Total Files

5

Last publish

Collaborators

  • reeceeboii