1.1.1 • Published 3 years ago
github-linguist-colours v1.1.1
GitHub Linguist Colours
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',
...
}