{"bugs":{"url":"https://github.com/Marak/colors.js/issues"},"dist":{"shasum":"55fa8c0c4454606756cd96ebcf520a9fcf743d11","tarball":"https://registry.npmjs.org/colors/-/colors-1.2.0-rc0.tgz","fileCount":19,"integrity":"sha512-NCYIuw9bgeBSokEO9eMoKtyXscuNdn/oaMWWDBXr+fp/BHd5HBhVP1FWHkRkCXPqZgEfWeP4ID+xM4rQPjnXjA==","signatures":[{"sig":"MEUCIQDqBFAfO9JTMExeE5Z+VcPh3UHmeiK+0EyMS/CHIFykOgIgM2d2sdY3z9ZkRs0eMR8w95/HWgzgay03ZEkYEcTgu+c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31382},"main":"lib/index.js","name":"colors","files":["examples","lib","LICENSE","safe.js","themes"],"author":{"name":"Marak Squires"},"readme":"# colors.js\n[![Build Status](https://travis-ci.org/Marak/colors.js.svg?branch=master)](https://travis-ci.org/Marak/colors.js)\n[![version](https://img.shields.io/npm/v/colors.svg)](https://www.npmjs.org/package/colors)\n[![dependencies](https://david-dm.org/Marak/colors.js.svg)](https://david-dm.org/Marak/colors.js)\n[![devDependencies](https://david-dm.org/Marak/colors.js/dev-status.svg)](https://david-dm.org/Marak/colors.js#info=devDependencies)\n\n## get color and style in your node.js console\n\n![Demo](https://raw.githubusercontent.com/Marak/colors.js/master/screenshots/colors.png)\n\n## Installation\n\n    npm install colors\n\n## colors and styles!\n\n### text colors\n\n  - black\n  - red\n  - green\n  - yellow\n  - blue\n  - magenta\n  - cyan\n  - white\n  - gray\n  - grey\n\n### background colors\n\n  - bgBlack\n  - bgRed\n  - bgGreen\n  - bgYellow\n  - bgBlue\n  - bgMagenta\n  - bgCyan\n  - bgWhite\n\n### styles\n\n  - reset\n  - bold\n  - dim\n  - italic\n  - underline\n  - inverse\n  - hidden\n  - strikethrough\n\n### extras\n\n  - rainbow\n  - zebra\n  - america\n  - trap\n  - random\n\n\n## Usage\n\nBy popular demand, `colors` now ships with two types of usages!\n\nThe super nifty way\n\n```js\nvar colors = require('colors');\n\nconsole.log('hello'.green); // outputs green text\nconsole.log('i like cake and pies'.underline.red) // outputs red underlined text\nconsole.log('inverse the color'.inverse); // inverses the color\nconsole.log('OMG Rainbows!'.rainbow); // rainbow\nconsole.log('Run the trap'.trap); // Drops the bass\n\n```\n\nor a slightly less nifty way which doesn't extend `String.prototype`\n\n```js\nvar colors = require('colors/safe');\n\nconsole.log(colors.green('hello')); // outputs green text\nconsole.log(colors.red.underline('i like cake and pies')) // outputs red underlined text\nconsole.log(colors.inverse('inverse the color')); // inverses the color\nconsole.log(colors.rainbow('OMG Rainbows!')); // rainbow\nconsole.log(colors.trap('Run the trap')); // Drops the bass\n\n```\n\nI prefer the first way. Some people seem to be afraid of extending `String.prototype` and prefer the second way. \n\nIf you are writing good code you will never have an issue with the first approach. If you really don't want to touch `String.prototype`, the second usage will not touch `String` native object.\n\n## Disabling Colors\n\nTo disable colors you can pass the following arguments in the command line to your application:\n\n```bash\nnode myapp.js --no-color\n```\n\n## Console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data)\n\n```js\nvar name = 'Marak';\nconsole.log(colors.green('Hello %s'), name);\n// outputs -> 'Hello Marak'\n```\n\n## Custom themes\n\n### Using standard API\n\n```js\n\nvar colors = require('colors');\n\ncolors.setTheme({\n  silly: 'rainbow',\n  input: 'grey',\n  verbose: 'cyan',\n  prompt: 'grey',\n  info: 'green',\n  data: 'grey',\n  help: 'cyan',\n  warn: 'yellow',\n  debug: 'blue',\n  error: 'red'\n});\n\n// outputs red text\nconsole.log(\"this is an error\".error);\n\n// outputs yellow text\nconsole.log(\"this is a warning\".warn);\n```\n\n### Using string safe API\n\n```js\nvar colors = require('colors/safe');\n\n// set single property\nvar error = colors.red;\nerror('this is red');\n\n// set theme\ncolors.setTheme({\n  silly: 'rainbow',\n  input: 'grey',\n  verbose: 'cyan',\n  prompt: 'grey',\n  info: 'green',\n  data: 'grey',\n  help: 'cyan',\n  warn: 'yellow',\n  debug: 'blue',\n  error: 'red'\n});\n\n// outputs red text\nconsole.log(colors.error(\"this is an error\"));\n\n// outputs yellow text\nconsole.log(colors.warn(\"this is a warning\"));\n\n```\n\n### Combining Colors\n\n```javascript\nvar colors = require('colors');\n\ncolors.setTheme({\n  custom: ['red', 'underline']\n});\n\nconsole.log('test'.custom);\n```\n\n*Protip: There is a secret undocumented style in `colors`. If you find the style you can summon him.*\n","engines":{"node":">=0.1.90"},"gitHead":"15abdf6f8577c0540abf1dec52bef504fea8a71f","license":"MIT","scripts":{"test":"node tests/basic-test.js && node tests/safe-test.js"},"_npmUser":{"name":"dabh","email":"dabh@stanford.edu"},"homepage":"https://github.com/Marak/colors.js","keywords":["ansi","terminal","colors"],"repository":{"url":"git+ssh://git@github.com/Marak/colors.js.git","type":"git"},"_npmVersion":"5.6.0","description":"get colors in your node.js console","directories":{},"maintainers":[{"name":"dabh","email":"dabh@stanford.edu"},{"name":"marak","email":"marak.squires@gmail.com"}],"_nodeVersion":"8.9.4","_hasShrinkwrap":false,"readmeFilename":"ReadMe.md","_npmOperationalInternal":{"tmp":"tmp/colors_1.2.0-rc0_1518821109073_0.13931783279293097","host":"s3://npm-registry-packages"},"_id":"colors@1.2.0-rc0","version":"1.2.0-rc0"}