
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
@kabeep/palette
Advanced tools
chalkoffers a user-friendly, chainable API. In spite of the excellent work done by @sindresorhus to reduce the size of the packaging as much as possible. But my view is that the key issue is not "Why not switch to a smaller coloring package?". Here’s why:
- No tree-shaking support, and no FP such as pipe/compose.
- You will still need to create the full
chalkusing the factory function if you only need to colour the red failure and green success messages.- In lightweight scenarios, static ANSI strings are much more cost-effective.
So I created this package.
It supports ANSI 16 colours, 256 colours and 16 million true colours like chalk.
Compared to other lightweight alternatives, it goes beyond basic ANSI keywords and also supports
Hex Triplet, RGB Color Model, and CSS Keywords.
But this does not mean it compromises on size or performance.
On the contrary, it performs excellently in Benchmark Reports.
Of course, all the coloring packages are more than fast enough,
I am just saying @kabeep/palette is a good choice for people who value size and performance.
See documentation.
npm install @kabeep/palette --save
yarn add @kabeep/palette
pnpm add @kabeep/palette
CommonJS
const pipe = require('lodash.flow');
const { bgRgb, hex, keyword, yellowBright } = require('@kabeep/palette');
const padding = (text: string) => ` ${text} `;
const palette = pipe(keyword('gold'), padding, bgRgb(255, 0, 0));
console.log(palette('Error'), yellowBright('Warning'), hex('#ff0000')('Message'));
ESModule
import pipe from 'lodash.flow';
import { bgRgb, hex, keyword, yellowBright } from '@kabeep/palette';
const padding = (text: string) => ` ${text} `;
const palette = pipe(keyword('gold'), padding, bgRgb(255, 0, 0));
console.log(palette('Error'), yellowBright('Warning'), hex('#ff0000')('Message'));
See the full list at W3C Wiki.
Contributions via Pull Requests or Issues are welcome.
This project is licensed under the MIT License. See the LICENSE file for details.
FAQs
A Node.js library for terminal text colour & style in FP.
We found that @kabeep/palette demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.