npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

fluident

v1.0.2

Published

A simple JavaScript package to add custom colors, gradients, and styles to your console logs.

Readme

🎨 fluident

fluident is a simple npm package for adding beautiful colors, gradients, and styles to your console output.
It leverages ANSI escape codes, ensuring compatibility with most modern terminals.


🚀 Installation

Install the package using npm:

npm install fluident

💻 Usage

Import the package into your JavaScript file and start styling your console logs:

const fluident = require('fluident');

// Basic usage
console.log(fluident.blue('This is a blue message.'));

Output:
(Displays "This is a blue message." in blue)

You can also chain methods for multiple effects:

const fluident = require('fluident');

console.log(
  fluident.bold(
    fluident.underline(
      fluident.cyan('This message is bold, underlined, and cyan.')
    )
  )
);

✨ Basic Styles

| Style Name | Example Code | |------------------|-------------------------------------------| | bold | fluident.bold('text') | | dim | fluident.dim('text') | | italic | fluident.italic('text') | | underline | fluident.underline('text') | | inverse | fluident.inverse('text') | | hidden | fluident.hidden('text') | | strikethrough| fluident.strikethrough('text') | | reset | fluident.reset('text') |


🎨 Standard Colors

| Color Name | Example Code | |-----------|-----------------------------| | black | fluident.black('text') | | red | fluident.red('text') | | green | fluident.green('text') | | yellow | fluident.yellow('text') | | blue | fluident.blue('text') | | magenta | fluident.magenta('text') | | cyan | fluident.cyan('text') | | white | fluident.white('text') | | gray | fluident.gray('text') |


🖌️ Background Colors

| Background Color | Example Code | |------------------|----------------------------------| | bgBlack | fluident.bgBlack('text') | | bgRed | fluident.bgRed('text') | | bgGreen | fluident.bgGreen('text') | | bgYellow | fluident.bgYellow('text') | | bgBlue | fluident.bgBlue('text') | | bgMagenta | fluident.bgMagenta('text') | | bgCyan | fluident.bgCyan('text') | | bgWhite | fluident.bgWhite('text') | | bgGray | fluident.bgGray('text') |


🔥 Advanced Usage

🌈 True Colors (24-bit)

fluident.hex(hexColor)

Applies a true color using a HEX code:

console.log(fluident.hex('#FF5733')('This is a custom hex color.'));

fluident.rgb(r, g, b)

Applies a true color using RGB values:

console.log(fluident.rgb(255, 0, 128)('This is a custom RGB color.'));

🌈 Gradients

Create horizontal or vertical gradients for your text.

fluident.gradient(text, hexColors, direction)

| Parameter | Description | |------------------|------------------------------------------------------------| | text | The text to apply the gradient to. | | hexColors | Array of HEX color strings (e.g. ['#ff0000', '#0000ff']).| | direction | 'horizontal' (default) or 'vertical'. |

Horizontal Gradient Example:

const myGradient = fluident.gradient(
  'Horizontal Rainbow!',
  ['#ff0000', '#ffff00', '#00ff00', '#0000ff']
);
console.log(myGradient);

Vertical Gradient Example:

const verticalText = `
V
e
r
t
i
c
a
l
`;

const myVerticalGradient = fluident.gradient(
  verticalText,
  ['#ff0000', '#0000ff'],
  'vertical'
);
console.log(myVerticalGradient);

ASCII Art

The ascii method converts your text into a blocky font suitable for console output.

fl.ascii(text)
  • text (string): The text to convert.

Example

const fl = require('fluident');

const asciiArt = fl.ascii('Hello');
console.log(fl.green(asciiArt));

📝 License

Licensed under the ISC License.