https://github.com/normal-coder/linguist-colors
Generate colors for programming language or file, base on GitHub/linguist
https://github.com/normal-coder/linguist-colors
colors file-extension github linguist linguist-color programming-color programming-language
Last synced: 7 months ago
JSON representation
Generate colors for programming language or file, base on GitHub/linguist
- Host: GitHub
- URL: https://github.com/normal-coder/linguist-colors
- Owner: normal-coder
- License: mit
- Created: 2024-09-17T17:32:17.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-01T06:26:57.000Z (about 1 year ago)
- Last Synced: 2025-02-24T11:46:51.684Z (8 months ago)
- Topics: colors, file-extension, github, linguist, linguist-color, programming-color, programming-language
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/linguist-colors
- Size: 309 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# linguist-colors
Generate colors for programming language or file,base on [gitHub-linguist](https://github.com/github-linguist/linguist).
## Install
You can install it in the following way:
via npm:
```shell
npm i linguist-colors
```via yarn:
```shell
yarn add linguist-colors
```via pnpm:
```shell
pnpm install linguist-colors
```## Usage
```typescript
import linguistColors from "linguist-colors"// Specify programming language to get color
linguistColors.getLangColor("TypeScript", 'HEX')
// Specify file extension to get color
linguistColors.getExtensionColor('.ts', 'HEX')
```## Thanks
The project is refactored and improved based on [LorenzoBloedow/programming-colors](https://github.com/LorenzoBloedow/programming-colors).
## LICENSE
Code released under the [MIT License](./LICENSE). Docs released under Creative Commons.