Gathering detailed insights and metrics for colors-cli
Gathering detailed insights and metrics for colors-cli
Gathering detailed insights and metrics for colors-cli
Gathering detailed insights and metrics for colors-cli
npm install colors-cli
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
76 Stars
127 Commits
14 Forks
3 Watching
2 Branches
4 Contributors
Updated on 22 Aug 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-7.8%
11,655
Compared to previous day
Last week
-1.7%
61,999
Compared to previous week
Last month
5.4%
282,401
Compared to previous month
Last year
36.2%
2,871,420
Compared to previous year
No dependencies detected.
Terminal string styling done right. ಠ_ಠ
Install with npm:
1npm install colors-cli --save-dev
bold
、 faint
、 italic
、 underline
、 blink
、 overline
、 inverse
、 conceal
、 strike
、
Foreground | Background | Bright Foreground | Bright Background | ||
---|---|---|---|---|---|
black | black_b | black_bt | black_bbt | ||
red | red_b | red_bt | red_bbt | ||
green | green_b | green_bt | green_bbt | ||
yellow | yellow_b | yellow_bt | yellow_bbt | ||
blue | blue_b | blue_bt | blue_bbt | ||
magenta | magenta_b | magenta_bt | magenta_bbt | ||
cyan | cyan_b | cyan_bt | cyan_bbt | ||
white | white_b | white_bt | white_bbt |
Output colored text:
1var color = require('colors-cli') 2console.log( color.red('hello') )
Best way is to predefine needed stylings and then use it:
1var color = require('colors-cli/safe') 2var error = color.red.bold; 3var warn = color.yellow; 4var notice = color.blue; 5console.log(error('Error!')); 6console.log(warn('Warning')); 7console.log(notice('Notice'));
Styles can be mixed:
1var color = require('colors-cli/safe') 2console.log('=>', color.red.bold.underline('hello') ) 3console.log('=>', color.magenta_bt.underline('hello ' + color.blue_bt('wo' + color.yellow_bt.magenta_bbt('r') + 'ld') + ' !!!!')); 4console.log('=>', color.magenta_bt.underline('hello ' + color.blue_bt('wo' + color.yellow_bt.magenta_bbt('r')))); 5console.log('=>', color.magenta_bt.underline('hello ' + color.blue_bt('world') + ' !!!!' + color.yellow('kenny') + ' wong' )); 6 7var color = require('colors-cli/safe') 8require('colors-cli/toxic') 9console.log('=> ' + color.underline('$ ' + 'npm'.magenta.underline + ' install'.yellow.underline + ' colors-cli --save-dev'));
1require('colors-cli/toxic') 2console.log( 'hello'.green ); 3console.log( 'hello'.green.black_b.underline ); 4console.log('=> $'.green + ' npm '.magenta + 'install '.yellow + 'colors-cli'.cyan + ' --save-dev');
Support ANSI 256 colors. [0 - 255], The rules of method name.
x32
xb32
1var color = require('colors-cli/safe') 2console.log( color.x45.bold.underline('hello') ) 3 4require('colors-cli/toxic') 5console.log( 'hello'.x23.underline ); 6console.log( 'hello'.green.xb34.underline );
1 Usage: colors 2 3 Options: 4 5 --black => black 6 --black_b => black_b 7 --red => red 8 ... 9 10 Examples: 11 12 colors --red "\nhello world" --bold,underline,yellow "wcj" 13 colors --green,bold "\nhello world" 14 colors --x12,bold "hello world"
The ANSI Escape sequences control code screen.
1echo -e "\033[31;41;4m something here 33[0m"
\033
As the escape character, inform the terminal to switch to the escape mode.
[
The beginning of the CSI.
m
Make the action to be performed.
;
ASCII code separator.
Licensed under the MIT License.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
packaging workflow detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More