Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta tweak #520

Merged
merged 1 commit into from Oct 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 28 additions & 0 deletions source/index.d.ts
Expand Up @@ -166,6 +166,13 @@ export interface ChalkInstance extends ChalkFunction {

/**
Use RGB values to set text color.

@example
```
import chalk from 'chalk';

chalk.rgb(222, 173, 237);
```
*/
rgb: (red: number, green: number, blue: number) => this;

Expand All @@ -185,11 +192,25 @@ export interface ChalkInstance extends ChalkFunction {

/**
Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color.

@example
```
import chalk from 'chalk';

chalk.ansi256(201);
```
*/
ansi256: (index: number) => this;

/**
Use RGB values to set background color.

@example
```
import chalk from 'chalk';

chalk.bgRgb(222, 173, 237);
```
*/
bgRgb: (red: number, green: number, blue: number) => this;

Expand All @@ -209,6 +230,13 @@ export interface ChalkInstance extends ChalkFunction {

/**
Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color.

@example
```
import chalk from 'chalk';

chalk.bgAnsi256(201);
```
*/
bgAnsi256: (index: number) => this;

Expand Down