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 🙏

© 2026 – Pkg Stats / Ryan Hefner

starlight-color

v1.0.5

Published

Starlight Programming Language with Color Support

Readme

Starlight Color Utilities

Package: starlight-color Author: Dominex Macedon


Description

starlight-color is a tiny, dependency-free Node.js library to style terminal output in Starlight Programming Language (or any Node.js CLI).

It supports:

  • Standard ANSI colors
  • Bright colors
  • Gray / dim variants
  • Background colors
  • 256-color foreground and background
  • Text styles (bold, underline, italic, inverse, strikethrough, hidden)

It works in any Node.js CLI environment and is safe to use with any type of value (numbers, objects, strings, etc.).


Installation

npm install starlight-color

Usage

Importing the package

import * as color from "starlight-color";

Basic Colors

console.log(color.colors.red("This text is red"));
console.log(color.colors.green("This text is green"));
console.log(color.colors.brightBlue("Bright blue text"));
console.log(color.colors.gray("Gray text"));

Background Colors

console.log(color.bgColors.yellow("Yellow background"));
console.log(color.bgColors.brightCyan("Bright cyan background"));

Text Styles

console.log(color.styles.bold("Bold text"));
console.log(color.styles.italic("Italic text"));
console.log(color.styles.underline("Underlined text"));
console.log(color.styles.strikethrough("Strikethrough text"));
console.log(color.styles.inverse("Inverse colors"));

256-Color Support

console.log(color.colors.fg256(202, "Foreground 256-color"));
console.log(color.bgColors.bg256(21, "Background 256-color"));

Combining Colors and Styles

Use the style() function to combine multiple effects:

console.log(color.style("Custom styled text", {
  color: "cyan",       // Foreground
  bg: "magenta",       // Background
  bold: true,
  underline: true
}));

console.log(color.style("256-color with bold", {
  fg256: 208,          // Foreground 256-color
  bg256: 20,           // Background 256-color
  bold: true
}));

Available Colors

Standard

  • black, red, green, yellow, blue, magenta, cyan, white, gray

Bright

  • brightRed, brightGreen, brightYellow, brightBlue, brightMagenta, brightCyan, brightWhite

Backgrounds

  • bgColors with same names, plus bright versions and 256-color support (bg256(n, text))

Styles

  • bold, dim, italic, underline, inverse, hidden, strikethrough

Notes

  • Works only in terminal/CLI environments (Node.js)
  • ANSI color codes are used; will not style browsers or GUI applications
  • Supports any JavaScript value, not just strings

Developer: Dominex Macedon