shellfie
TypeScript icon, indicating that this package has built-in type declarations

1.3.7 • Public • Published

shellfie 🤳🏽

install

npm install shellfie

the holy trinity ▽

shellfie respects the holy trinity: the lib, the service, and the holy cli.

usage

const data = [
    '\x1b[105mSHELLFIE\\x1b[0m🤳',
    '\x1b[38;5;225mthe easiest way',
    '\x1b[38;5;213mto create beautiful',
    '\x1b[38;5;14mCLI screenshots 📸',
    '\x1b[38;5;199mprogrammatically 🚀'
];
const options = {
    name: 'shellfie',
    style: {
        fontSize: 15,
        fontWeight: 'bold',
        fontFamily: 'Fira Code'
    },
    viewport: {
        width: 400,
        height: 300
    }
}
await shellfie(data, options);

outputs:

Apple Silicon

# NOTE! if you are running on Apple Silicon you may need to set the following env variables: 
export PUPPETEER_EXECUTABLE_PATH=`which chromium`
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
 ```f

# data
**type**: `string[]` || `string`   
**description**: string data to output to the terminal

# options
**type**: `object`   
**description**: optional config for `shellfie`
### `name`
**type**: `string`   
**description**: name of image   
### `location`
**type**: `string`   
**description**: relative path to save your shellfies   
### `puppeteerOptions`
**type**: `object`   
**description**: optional puppteer args    
**default**: `{ args: ['--no-sandbox', '--disable-setuid-sandbox'] }`
### `mode`
**type**: `string`   
**description**: can allow raw string input. for example: `yarn test --colors > help.txt`, then copy the text and provide it to `shellfie` with this option set to `raw`.   
**default**: `default`
### `theme`
**type**: `object`   
**description**: optional theme style
- #### `background`
  **type**: `string`   
  **description**: css color for terminal background   
  **default**: `'#151515'`
- #### `forground`
  **type**: `string`   
  **description**: css color for any unformatted string provided in `data`
### `style`
  **type**: `object`   
  **description**: css properties for terminal output
- #### `fontSize`
  **type**: `number`   
  **description**: font size
- #### `fontWeight`
  **type**: `string`   
  **description**: font weight
- #### `fontFamily`
  **type**: `string`   
  **description**: font family
### `viewport`
**type**: `object`   
**description**: viewport of terminal   
**default**: `{ width: 700, height: 600 }`
- #### `width`
  **type**: `number`   
  **description**: viewport width
- #### `height`
  **type**: `number`   
  **description**: viewport height

# examples
```javascript
await shellfie(["\x1b[32mGreen line", "\x1b[31;1mRED bold"], { name: 'small', viewport: { width: 200, height: 200 } });

const testResults = [
    "[2K[1G[1myarn run v1.22.5[22m",
    "[2K[1G[2m$ mocha --no-timeouts tests/ --colors[22m",
    "",
    "[0m[0m",
    "[0m  shellfie[0m",
    "  [32m  ✓[0m[90m should support array of string and output a png file[0m[31m (1106ms)[0m",
    "  [32m  ✓[0m[90m should show into img[0m[31m (983ms)[0m",
    "  [32m  ✓[0m[90m should support custom viewport[0m[31m (982ms)[0m",
    "  [32m  ✓[0m[90m should support long raw output[0m[31m (2287ms)[0m",
    "  [32m  ✓[0m[90m should support raw string[0m[31m (1087ms)[0m",
    "  [32m  ✓[0m[90m should support complex string[0m[31m (1079ms)[0m",
    "  [32m  ✓[0m[90m should support different font family[0m[31m (5541ms)[0m",
    "  [32m  ✓[0m[90m should support chartscii fancy example[0m[31m (1123ms)[0m",
    "  [32m  ✓[0m[90m should support fancy unsplitted[0m[31m (1082ms)[0m",
    "  [32m  ✓[0m[90m should support string output[0m[31m (947ms)[0m",
    "  [32m  ✓[0m[90m should magically work with magic numbers[0m[31m (1945ms)[0m",
    "  [32m  ✓[0m[90m should work with lolcat[0m[31m (1102ms)[0m",
    "",
    "",
    "[92m [0m[32m 12 passing[0m[90m (19s)[0m",
    "",
    "[2K[1GDone in 19.60s.",
];
await shellfie(testResults, { name: 'fira', style: { fontFamily: 'Fira Code', fontWeight: 'bold' } });
await shellfie(testResults, { name: 'monospace', style: { fontFamily: 'monospace' } });
await shellfie(testResults, { name: 'monaco', style: { fontFamily: 'Monaco' } });

raw mode

const string = `    
cristal     [38;2;189;255;243m■[39m[38;2;187;254;241m■[39m[38;2;184;252;239m■[39m[38;2;182;251;237m■[39m[38;2;179;250;235m■[39m[38;2;177;249;234m■[39m[38;2;174;247;232m■[39m[38;2;172;246;230m■[39m[38;2;169;245;228m■[39m[38;2;167;243;226m■[39m[38;2;165;242;224m■[39m[38;2;162;241;222m■[39m[38;2;160;239;220m■[39m[38;2;157;238;218m■[39m[38;2;155;237;216m■[39m[38;2;152;236;215m■[39m[38;2;150;234;213m■[39m[38;2;147;233;211m■[39m[38;2;145;232;209m■[39m[38;2;143;230;207m■[39m[38;2;140;229;205m■[39m[38;2;138;228;203m■[39m[38;2;135;226;201m■[39m[38;2;133;225;199m■[39m[38;2;130;224;198m■[39m[38;2;128;223;196m■[39m[38;2;125;221;194m■[39m[38;2;123;220;192m■[39m[38;2;120;219;190m■[39m[38;2;118;217;188m■[39m[38;2;116;216;186m■[39m[38;2;113;215;184m■[39m[38;2;111;213;182m■[39m[38;2;108;212;181m■[39m[38;2;106;211;179m■[39m[38;2;103;210;177m■[39m[38;2;101;208;175m■[39m[38;2;98;207;173m■[39m[38;2;96;206;171m■[39m[38;2;94;204;169m■[39m[38;2;91;203;167m■[39m[38;2;89;202;165m■[39m[38;2;86;200;163m■[39m[38;2;84;199;162m■[39m[38;2;81;198;160m■[39m[38;2;79;197;158m■[39m[38;2;76;195;156m■[39m[38;2;74;194;154m■[39m
teen        [38;2;119;161;211m■[39m[38;2;119;163;211m■[39m[38;2;119;165;210m■[39m[38;2;119;166;210m■[39m[38;2;119;168;209m■[39m[38;2;119;170;209m■[39m[38;2;120;172;209m■[39m[38;2;120;174;208m■[39m[38;2;120;176;208m■[39m[38;2;120;177;207m■[39m[38;2;120;179;207m■[39m[38;2;120;181;207m■[39m[38;2;120;183;206m■[39m[38;2;120;185;206m■[39m[38;2;120;187;206m■[39m[38;2;120;188;205m■[39m[38;2;120;190;205m■[39m[38;2;120;192;204m■[39m[38;2;121;194;204m■[39m[38;2;121;196;204m■[39m[38;2;121;198;203m■[39m[38;2;121;199;203m■[39m[38;2;121;201;202m■[39m[38;2;121;203;202m■[39m[38;2;126;200;201m■[39m[38;2;130;197;200m■[39m[38;2;135;194;199m■[39m[38;2;139;191;197m■[39m[38;2;144;188;196m■[39m[38;2;148;185;195m■[39m[38;2;153;182;194m■[39m[38;2;157;179;193m■[39m[38;2;162;176;192m■[39m[38;2;166;173;190m■[39m[38;2;171;170;189m■[39m[38;2;176;168;188m■[39m[38;2;180;165;187m■[39m[38;2;185;162;186m■[39m[38;2;189;159;185m■[39m[38;2;194;156;183m■[39m[38;2;198;153;182m■[39m[38;2;203;150;181m■[39m[38;2;207;147;180m■[39m[38;2;212;144;179m■[39m[38;2;216;141;178m■[39m[38;2;221;138;176m■[39m[38;2;225;135;175m■[39m[38;2;230;132;174m■[39m
mind        [38;2;71;59;123m■[39m[38;2;70;62;125m■[39m[38;2;69;65;127m■[39m[38;2;69;69;129m■[39m[38;2;68;72;131m■[39m[38;2;67;75;133m■[39m[38;2;66;78;134m■[39m[38;2;66;81;136m■[39m[38;2;65;84;138m■[39m[38;2;64;88;140m■[39m[38;2;63;91;142m■[39m[38;2;62;94;144m■[39m[38;2;62;97;146m■[39m[38;2;61;100;148m■[39m[38;2;60;103;150m■[39m[38;2;59;107;152m■[39m[38;2;58;110;154m■[39m[38;2;58;113;156m■[39m[38;2;57;116;157m■[39m[38;2;56;119;159m■[39m[38;2;55;122;161m■[39m[38;2;55;126;163m■[39m[38;2;54;129;165m■[39m[38;2;53;132;167m■[39m[38;2;53;135;168m■[39m[38;2;53;139;169m■[39m[38;2;52;142;170m■[39m[38;2;52;145;171m■[39m[38;2;52;148;172m■[39m[38;2;52;152;173m■[39m[38;2;52;155;174m■[39m[38;2;51;158;175m■[39m[38;2;51;161;176m■[39m[38;2;51;165;177m■[39m[38;2;51;168;178m■[39m[38;2;51;171;179m■[39m[38;2;50;174;179m■[39m[38;2;50;178;180m■[39m[38;2;50;181;181m■[39m[38;2;50;184;182m■[39m[38;2;49;187;183m■[39m[38;2;49;191;184m■[39m[38;2;49;194;185m■[39m[38;2;49;197;186m■[39m[38;2;49;200;187m■[39m[38;2;48;204;188m■[39m[38;2;48;207;189m■[39m[38;2;48;210;190m■[39m
morning     [38;2;255;95;109m■[39m[38;2;255;95;107m■[39m[38;2;255;96;105m■[39m[38;2;255;96;103m■[39m[38;2;255;97;101m■[39m[38;2;255;97;100m■[39m[38;2;255;97;98m■[39m[38;2;255;100;98m■[39m[38;2;255;102;98m■[39m[38;2;255;105;98m■[39m[38;2;255;107;99m■[39m[38;2;255;110;99m■[39m[38;2;255;112;100m■[39m[38;2;255;115;100m■[39m[38;2;255;117;100m■[39m[38;2;255;120;101m■[39m[38;2;255;123;101m■[39m[38;2;255;125;102m■[39m[38;2;255;127;102m■[39m[38;2;255;130;102m■[39m[38;2;255;132;103m■[39m[38;2;255;135;103m■[39m[38;2;255;137;103m■[39m[38;2;255;140;104m■[39m[38;2;255;142;104m■[39m[38;2;255;145;105m■[39m[38;2;255;147;105m■[39m[38;2;255;149;105m■[39m[38;2;255;152;106m■[39m[38;2;255;154;106m■[39m[38;2;255;157;107m■[39m[38;2;255;159;107m■[39m[38;2;255;161;107m■[39m[38;2;255;164;108m■[39m[38;2;255;166;108m■[39m[38;2;255;168;108m■[39m[38;2;255;170;109m■[39m[38;2;255;173;109m■[39m[38;2;255;175;110m■[39m[38;2;255;177;110m■[39m[38;2;255;180;110m■[39m[38;2;255;182;111m■[39m[38;2;255;184;111m■[39m[38;2;255;186;111m■[39m[38;2;255;188;112m■[39m[38;2;255;191;112m■[39m[38;2;255;193;113m■[39m[38;2;255;195;113m■[39m
vice        [38;2;94;231;223m■[39m[38;2;95;230;227m■[39m[38;2;96;228;230m■[39m[38;2;98;223;229m■[39m[38;2;99;218;229m■[39m[38;2;100;213;228m■[39m[38;2;101;208;227m■[39m[38;2;103;203;227m■[39m[38;2;104;198;226m■[39m[38;2;105;194;225m■[39m[38;2;106;189;225m■[39m[38;2;107;185;224m■[39m[38;2;108;181;224m■[39m[38;2;110;177;223m■[39m[38;2;111;173;222m■[39m[38;2;112;169;222m■[39m[38;2;113;166;221m■[39m[38;2;114;162;220m■[39m[38;2;115;159;220m■[39m[38;2;116;155;219m■[39m[38;2;117;152;219m■[39m[38;2;119;149;218m■[39m[38;2;120;146;217m■[39m[38;2;121;143;217m■[39m[38;2;122;141;216m■[39m[38;2;123;138;216m■[39m[38;2;124;136;215m■[39m[38;2;125;133;214m■[39m[38;2;126;131;214m■[39m[38;2;127;129;213m■[39m[38;2;129;128;212m■[39m[38;2;133;129;212m■[39m[38;2;137;130;211m■[39m[38;2;141;131;211m■[39m[38;2;144;132;210m■[39m[38;2;148;133;209m■[39m[38;2;151;134;209m■[39m[38;2;154;135;208m■[39m[38;2;157;136;208m■[39m[38;2;160;137;207m■[39m[38;2;163;138;206m■[39m[38;2;166;139;206m■[39m[38;2;169;140;205m■[39m[38;2;171;140;204m■[39m[38;2;173;141;204m■[39m[38;2;176;142;203m■[39m[38;2;178;143;203m■[39m[38;2;180;144;202m■[39m
passion     [38;2;244;59;71m■[39m[38;2;240;59;73m■[39m[38;2;237;59;74m■[39m[38;2;233;59;76m■[39m[38;2;229;59;78m■[39m[38;2;225;59;79m■[39m[38;2;222;59;81m■[39m[38;2;218;59;82m■[39m[38;2;214;59;84m■[39m[38;2;210;59;86m■[39m[38;2;207;59;87m■[39m[38;2;203;59;89m■[39m[38;2;199;59;91m■[39m[38;2;196;59;92m■[39m[38;2;192;59;94m■[39m[38;2;188;59;96m■[39m[38;2;184;59;97m■[39m[38;2;181;59;99m■[39m[38;2;177;59;100m■[39m[38;2;173;59;102m■[39m[38;2;170;59;104m■[39m[38;2;166;59;105m■[39m[38;2;162;59;107m■[39m[38;2;158;59;109m■[39m[38;2;155;58;110m■[39m[38;2;151;58;112m■[39m[38;2;147;58;114m■[39m[38;2;143;58;115m■[39m[38;2;140;58;117m■[39m[38;2;136;58;119m■[39m[38;2;132;58;120m■[39m[38;2;129;58;122m■[39m[38;2;125;58;123m■[39m[38;2;121;58;125m■[39m[38;2;117;58;127m■[39m[38;2;114;58;128m■[39m[38;2;110;58;130m■[39m[38;2;106;58;132m■[39m[38;2;103;58;133m■[39m[38;2;99;58;135m■[39m[38;2;95;58;137m■[39m[38;2;91;58;138m■[39m[38;2;88;58;140m■[39m[38;2;84;58;141m■[39m[38;2;80;58;143m■[39m[38;2;76;58;145m■[39m[38;2;73;58;146m■[39m[38;2;69;58;148m■[39m
fruit       [38;2;255;78;80m■[39m[38;2;255;81;79m■[39m[38;2;255;84;78m■[39m[38;2;255;87;77m■[39m[38;2;254;89;76m■[39m[38;2;254;92;75m■[39m[38;2;254;95;74m■[39m[38;2;254;98;73m■[39m[38;2;254;101;72m■[39m[38;2;254;104;71m■[39m[38;2;254;107;70m■[39m[38;2;254;109;69m■[39m[38;2;253;112;69m■[39m[38;2;253;115;68m■[39m[38;2;253;118;67m■[39m[38;2;253;121;66m■[39m[38;2;253;124;65m■[39m[38;2;253;126;64m■[39m[38;2;253;129;63m■[39m[38;2;253;132;62m■[39m[38;2;252;135;61m■[39m[38;2;252;138;60m■[39m[38;2;252;141;59m■[39m[38;2;252;144;58m■[39m[38;2;252;146;57m■[39m[38;2;252;149;56m■[39m[38;2;252;152;55m■[39m[38;2;252;155;54m■[39m[38;2;251;158;53m■[39m[38;2;251;161;52m■[39m[38;2;251;164;51m■[39m[38;2;251;166;50m■[39m[38;2;251;169;49m■[39m[38;2;251;172;48m■[39m[38;2;251;175;47m■[39m[38;2;251;178;46m■[39m[38;2;250;181;46m■[39m[38;2;250;183;45m■[39m[38;2;250;186;44m■[39m[38;2;250;189;43m■[39m[38;2;250;192;42m■[39m[38;2;250;195;41m■[39m[38;2;250;198;40m■[39m[38;2;250;201;39m■[39m[38;2;249;203;38m■[39m[38;2;249;206;37m■[39m[38;2;249;209;36m■[39m[38;2;249;212;35m■[39m
instagram   [38;2;131;58;180m■[39m[38;2;136;57;173m■[39m[38;2;142;55;167m■[39m[38;2;147;54;160m■[39m[38;2;152;53;154m■[39m[38;2;158;52;147m■[39m[38;2;163;50;141m■[39m[38;2;168;49;134m■[39m[38;2;173;48;127m■[39m[38;2;179;47;121m■[39m[38;2;184;45;114m■[39m[38;2;189;44;108m■[39m[38;2;195;43;101m■[39m[38;2;200;42;95m■[39m[38;2;205;40;88m■[39m[38;2;211;39;82m■[39m[38;2;216;38;75m■[39m[38;2;221;37;68m■[39m[38;2;226;35;62m■[39m[38;2;232;34;55m■[39m[38;2;237;33;49m■[39m[38;2;242;32;42m■[39m[38;2;248;30;36m■[39m[38;2;253;29;29m■[39m[38;2;253;35;31m■[39m[38;2;253;41;32m■[39m[38;2;253;47;34m■[39m[38;2;253;54;36m■[39m[38;2;253;60;37m■[39m[38;2;253;66;39m■[39m[38;2;253;72;41m■[39m[38;2;253;78;42m■[39m[38;2;253;84;44m■[39m[38;2;253;90;46m■[39m[38;2;253;96;47m■[39m[38;2;253;103;49m■[39m[38;2;252;109;51m■[39m[38;2;252;115;52m■[39m[38;2;252;121;54m■[39m[38;2;252;127;56m■[39m[38;2;252;133;57m■[39m[38;2;252;139;59m■[39m[38;2;252;145;61m■[39m[38;2;252;152;62m■[39m[38;2;252;158;64m■[39m[38;2;252;164;66m■[39m[38;2;252;170;67m■[39m[38;2;252;176;69m■[39m
atlas       [38;2;254;172;94m■[39m[38;2;252;170;99m■[39m[38;2;249;168;104m■[39m[38;2;247;165;109m■[39m[38;2;244;163;114m■[39m[38;2;242;161;119m■[39m[38;2;240;159;124m■[39m[38;2;237;156;129m■[39m[38;2;235;154;134m■[39m[38;2;232;152;139m■[39m[38;2;230;150;144m■[39m[38;2;228;148;149m■[39m[38;2;225;145;153m■[39m[38;2;223;143;158m■[39m[38;2;221;141;163m■[39m[38;2;218;139;168m■[39m[38;2;216;137;173m■[39m[38;2;213;134;178m■[39m[38;2;211;132;183m■[39m[38;2;209;130;188m■[39m[38;2;206;128;193m■[39m[38;2;204;125;198m■[39m[38;2;201;123;203m■[39m[38;2;199;121;208m■[39m[38;2;194;124;208m■[39m[38;2;189;127;207m■[39m[38;2;184;130;207m■[39m[38;2;178;133;207m■[39m[38;2;173;136;206m■[39m[38;2;168;139;206m■[39m[38;2;163;142;206m■[39m[38;2;158;145;205m■[39m[38;2;153;148;205m■[39m[38;2;147;151;205m■[39m[38;2;142;154;204m■[39m[38;2;137;157;204m■[39m[38;2;132;159;204m■[39m[38;2;127;162;203m■[39m[38;2;122;165;203m■[39m[38;2;116;168;203m■[39m[38;2;111;171;202m■[39m[38;2;106;174;202m■[39m[38;2;101;177;202m■[39m[38;2;96;180;201m■[39m[38;2;91;183;201m■[39m[38;2;85;186;201m■[39m[38;2;80;189;200m■[39m[38;2;75;192;200m■[39m
retro       [38;2;63;81;177m■[39m[38;2;68;82;176m■[39m[38;2;74;83;176m■[39m[38;2;79;83;175m■[39m[38;2;85;84;175m■[39m[38;2;90;85;174m■[39m[38;2;96;87;174m■[39m[38;2;101;88;173m■[39m[38;2;107;90;173m■[39m[38;2;112;92;173m■[39m[38;2;118;93;172m■[39m[38;2;123;95;172m■[39m[38;2;126;97;172m■[39m[38;2;130;99;173m■[39m[38;2;133;101;173m■[39m[38;2;136;102;173m■[39m[38;2;140;104;174m■[39m[38;2;143;106;174m■[39m[38;2;147;106;172m■[39m[38;2;151;106;171m■[39m[38;2;156;106;169m■[39m[38;2;160;106;167m■[39m[38;2;164;106;166m■[39m[38;2;168;106;164m■[39m[38;2;174;106;160m■[39m[38;2;180;106;157m■[39m[38;2;186;107;153m■[39m[38;2;192;107;149m■[39m[38;2;198;107;146m■[39m[38;2;204;107;142m■[39m[38;2;210;111;137m■[39m[38;2;216;115;132m■[39m[38;2;223;119;128m■[39m[38;2;229;122;123m■[39m[38;2;235;126;118m■[39m[38;2;241;130;113m■[39m[38;2;241;136;112m■[39m[38;2;242;141;110m■[39m[38;2;242;147;109m■[39m[38;2;242;153;108m■[39m[38;2;243;158;106m■[39m[38;2;243;164;105m■[39m[38;2;244;170;108m■[39m[38;2;244;176;110m■[39m[38;2;245;183;113m■[39m[38;2;246;189;115m■[39m[38;2;246;195;118m■[39m[38;2;247;201;120m■[39m
summer      [38;2;253;187;45m■[39m[38;2;248;187;48m■[39m[38;2;244;187;51m■[39m[38;2;239;187;55m■[39m[38;2;234;188;58m■[39m[38;2;230;188;61m■[39m[38;2;225;188;64m■[39m[38;2;220;188;67m■[39m[38;2;216;188;71m■[39m[38;2;211;188;74m■[39m[38;2;206;188;77m■[39m[38;2;202;188;80m■[39m[38;2;197;189;83m■[39m[38;2;192;189;86m■[39m[38;2;188;189;90m■[39m[38;2;183;189;93m■[39m[38;2;178;189;96m■[39m[38;2;174;189;99m■[39m[38;2;169;189;102m■[39m[38;2;164;189;106m■[39m[38;2;160;190;109m■[39m[38;2;155;190;112m■[39m[38;2;150;190;115m■[39m[38;2;146;190;118m■[39m[38;2;141;190;122m■[39m[38;2;137;190;125m■[39m[38;2;132;190;128m■[39m[38;2;127;190;131m■[39m[38;2;123;191;134m■[39m[38;2;118;191;138m■[39m[38;2;113;191;141m■[39m[38;2;109;191;144m■[39m[38;2;104;191;147m■[39m[38;2;99;191;150m■[39m[38;2;95;191;154m■[39m[38;2;90;191;157m■[39m[38;2;85;192;160m■[39m[38;2;81;192;163m■[39m[38;2;76;192;166m■[39m[38;2;71;192;169m■[39m[38;2;67;192;173m■[39m[38;2;62;192;176m■[39m[38;2;57;192;179m■[39m[38;2;53;192;182m■[39m[38;2;48;193;185m■[39m[38;2;43;193;189m■[39m[38;2;39;193;192m■[39m[38;2;34;193;195m■[39m
pastel      [38;2;116;235;213m■[39m[38;2;116;235;228m■[39m[38;2;116;227;235m■[39m[38;2;116;212;235m■[39m[38;2;116;196;235m■[39m[38;2;116;181;235m■[39m[38;2;116;166;235m■[39m[38;2;116;151;235m■[39m[38;2;116;136;235m■[39m[38;2;116;120;235m■[39m[38;2;127;116;235m■[39m[38;2;142;116;235m■[39m[38;2;157;116;235m■[39m[38;2;172;116;235m■[39m[38;2;188;116;235m■[39m[38;2;203;116;235m■[39m[38;2;218;116;235m■[39m[38;2;233;116;235m■[39m[38;2;235;116;222m■[39m[38;2;235;116;207m■[39m[38;2;235;116;192m■[39m[38;2;235;116;177m■[39m[38;2;235;116;161m■[39m[38;2;235;116;146m■[39m[38;2;235;116;131m■[39m[38;2;236;116;116m■[39m[38;2;236;132;116m■[39m[38;2;236;147;116m■[39m[38;2;236;162;116m■[39m[38;2;236;177;116m■[39m[38;2;236;193;116m■[39m[38;2;236;208;116m■[39m[38;2;236;223;116m■[39m[38;2;233;236;116m■[39m[38;2;218;236;116m■[39m[38;2;202;236;116m■[39m[38;2;187;236;116m■[39m[38;2;172;236;116m■[39m[38;2;157;236;116m■[39m[38;2;141;236;116m■[39m[38;2;126;236;116m■[39m[38;2;116;236;121m■[39m[38;2;116;236;136m■[39m[38;2;116;236;152m■[39m[38;2;116;236;167m■[39m[38;2;116;236;182m■[39m[38;2;116;236;198m■[39m[38;2;116;236;213m■[39m
rainbow     [38;2;255;0;0m■[39m[38;2;255;0;33m■[39m[38;2;255;0;65m■[39m[38;2;255;0;98m■[39m[38;2;255;0;130m■[39m[38;2;255;0;163m■[39m[38;2;255;0;195m■[39m[38;2;255;0;228m■[39m[38;2;250;0;255m■[39m[38;2;217;0;255m■[39m[38;2;185;0;255m■[39m[38;2;152;0;255m■[39m[38;2;120;0;255m■[39m[38;2;87;0;255m■[39m[38;2;55;0;255m■[39m[38;2;22;0;255m■[39m[38;2;0;11;255m■[39m[38;2;0;43;255m■[39m[38;2;0;76;255m■[39m[38;2;0;108;255m■[39m[38;2;0;141;255m■[39m[38;2;0;173;255m■[39m[38;2;0;206;255m■[39m[38;2;0;238;255m■[39m[38;2;0;255;239m■[39m[38;2;0;255;207m■[39m[38;2;0;255;174m■[39m[38;2;0;255;142m■[39m[38;2;0;255;109m■[39m[38;2;0;255;77m■[39m[38;2;0;255;44m■[39m[38;2;0;255;12m■[39m[38;2;21;255;0m■[39m[38;2;54;255;0m■[39m[38;2;86;255;0m■[39m[38;2;119;255;0m■[39m[38;2;151;255;0m■[39m[38;2;184;255;0m■[39m[38;2;216;255;0m■[39m[38;2;249;255;0m■[39m[38;2;255;229;0m■[39m[38;2;255;196;0m■[39m[38;2;255;164;0m■[39m[38;2;255;131;0m■[39m[38;2;255;99;0m■[39m[38;2;255;66;0m■[39m[38;2;255;34;0m■[39m[38;2;255;1;0m■[39m
  `
await shellfie(string, { name: 'gradient', mode: 'raw', viewport: {width: 600, height: 350} });

bash colors

const shellfie = require('shellfie');
let backgroundColors = '';
for (let i = 0; i < 255; i++) {
    backgroundColors += `\x1b[48;5;${i}m ${i}\x1b[0m`;
}
await shellfie(backgroundColors, { name: 'background', viewport: {width: 500, height: 400} });

Package Sidebar

Install

npm i shellfie

Weekly Downloads

1

Version

1.3.7

License

MIT

Unpacked Size

31.2 kB

Total Files

9

Last publish

Collaborators

  • tool3