Skip to content

Commit

Permalink
feat(ansi): add hsl and rgb values
Browse files Browse the repository at this point in the history
  • Loading branch information
sgoudham committed Nov 2, 2024
1 parent 92f704d commit 9eb397d
Show file tree
Hide file tree
Showing 3 changed files with 723 additions and 25 deletions.
38 changes: 38 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,44 @@ export type AnsiColorFormat = Readonly<{
*/
hex: string;

/**
* Formatted rgb value.
* @example { r: 186, g: 187, b: 241}
*/
rgb: {
/**
* Red, 0-255
*/
r: number;
/**
* Green, 0-255
*/
g: number;
/**
* Blue, 0-255
*/
b: number;
};

/**
* Formatted hsl value.
* @example { h: 238.9, s: 12.1, l: 83.5 }
*/
hsl: {
/**
* Hue, 0-360
*/
h: number;
/**
* Saturation, 0-100
*/
s: number;
/**
* Lightness, 0-100
*/
l: number;
};

/**
* The ANSI color code.
* @example 4
Expand Down
Loading

0 comments on commit 9eb397d

Please sign in to comment.