NORMAL_INTENSITY

NORMAL_INTENSITY is the ANSI escape code that resets bold and dim (intensity) attributes without affecting any other terminal attributes such as color or background.

Definition

const NORMAL_INTENSITY = "\x1b[22m";

Description

The value "\x1b[22m" is the SGR parameter 22 — "normal color or intensity". It turns off bold and dim without resetting foreground color, background color, or any other style. This makes it the safe choice when you only want to undo a Styles.bold or Styles.dim without side effects.

Usage

import { Styles, Colors, NORMAL_INTENSITY, DEFAULT_COLOR } from "ts-better-console";

// Bold is cleared; the red foreground continues until DEFAULT_COLOR
console.log(
Colors.red +
Styles.bold +
"Bold red" +
NORMAL_INTENSITY +
" still red, not bold" +
DEFAULT_COLOR
);

Want to support this project?

If you find ts-better-console useful and want to support its development, consider starring the GitHub repository or buying me a coffee! Your support helps me dedicate more time to improving the library and adding new features.

Want to contribute to this project?

Contributions are welcome! If you're interested in improving the library, fixing bugs, or adding new features, feel free to check out the GitHub repository and submit a pull request. Whether you're a seasoned developer or new to open source, your contributions can make a difference!