Skip to content

Commit 64d0b62

Browse files
nektrozackradisic
andauthored
Bun.color: fill out missing options and examples for outputFormat (#14656)
Co-authored-by: Zack Radisic <56137411+zackradisic@users.noreply.github.com>
1 parent e5c00ab commit 64d0b62

1 file changed

Lines changed: 28 additions & 10 deletions

File tree

packages/bun-types/bun.d.ts

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3113,32 +3113,50 @@ declare module "bun" {
31133113
* @example \x1b[38;2;100;200;200m
31143114
*/
31153115
| "ansi"
3116+
| "ansi-16"
3117+
| "ansi-16m"
31163118
/**
31173119
* 256 color ANSI color string, for use in terminals which don't support true color
31183120
*
31193121
* Tries to match closest 24-bit color to 256 color palette
31203122
*/
3121-
| "ansi256"
3123+
| "ansi-256"
3124+
/**
3125+
* Picks the format that produces the shortest output
3126+
*/
3127+
| "css"
31223128
/**
31233129
* Lowercase hex color string without alpha
3124-
* @example #aabb11
3130+
* @example #ff9800
31253131
*/
31263132
| "hex"
3133+
/**
3134+
* Uppercase hex color string without alpha
3135+
* @example #FF9800
3136+
*/
3137+
| "HEX"
3138+
/**
3139+
* @example hsl(35.764706, 1, 0.5)
3140+
*/
3141+
| "hsl"
3142+
/**
3143+
* @example lab(0.72732764, 33.938198, -25.311619)
3144+
*/
3145+
| "lab"
3146+
/**
3147+
* @example 16750592
3148+
*/
3149+
| "number"
31273150
/**
31283151
* RGB color string without alpha
3129-
* rgb(100, 200, 200)
3152+
* @example rgb(255, 152, 0)
31303153
*/
31313154
| "rgb"
31323155
/**
31333156
* RGB color string with alpha
3134-
* rgba(100, 200, 200, 0.5)
3157+
* @example rgba(255, 152, 0, 1)
31353158
*/
3136-
| "rgba"
3137-
| "hsl"
3138-
| "lab"
3139-
| "css"
3140-
| "lab"
3141-
| "HEX",
3159+
| "rgba",
31423160
): string | null;
31433161

31443162
function color(

0 commit comments

Comments
 (0)