Guest User

Untitled

a guest
Jul 13th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.74 KB | None | 0 0
  1. {
  2. "name": "ansi-styles",
  3. "version": "2.2.0",
  4. "description": "ANSI escape codes for styling strings in the terminal",
  5. "license": "MIT",
  6. "repository": {
  7. "type": "git",
  8. "url": "https://github.com/chalk/ansi-styles"
  9. },
  10. "author": {
  11. "name": "Sindre Sorhus",
  12. "email": "sindresorhus@gmail.com",
  13. "url": "sindresorhus.com"
  14. },
  15. "maintainers": [
  16. {
  17. "name": "Sindre Sorhus",
  18. "email": "sindresorhus@gmail.com",
  19. "url": "sindresorhus.com"
  20. },
  21. {
  22. "name": "Joshua Boy Nicolai Appelman",
  23. "email": "joshua@jbna.nl",
  24. "url": "jbna.nl"
  25. },
  26. {
  27. "name": "Josh Junon",
  28. "email": "i.am.qix@gmail.com",
  29. "url": "github.com/qix-"
  30. }
  31. ],
  32. "engines": {
  33. "node": ">=0.10.0"
  34. },
  35. "scripts": {
  36. "test": "xo && ava"
  37. },
  38. "files": [
  39. "index.js"
  40. ],
  41. "keywords": [
  42. "ansi",
  43. "styles",
  44. "color",
  45. "colour",
  46. "colors",
  47. "terminal",
  48. "console",
  49. "cli",
  50. "string",
  51. "tty",
  52. "escape",
  53. "formatting",
  54. "rgb",
  55. "256",
  56. "shell",
  57. "xterm",
  58. "log",
  59. "logging",
  60. "command-line",
  61. "text"
  62. ],
  63. "dependencies": {
  64. "color-convert": "^1.0.0"
  65. },
  66. "devDependencies": {
  67. "ava": "*",
  68. "xo": "*"
  69. },
  70. "readme": "# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles)\n\n> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal\n\nYou probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.\n\n![](screenshot.png)\n\n\n## Install\n\n```\n$ npm install --save ansi-styles\n```\n\n\n## Usage\n\n```js\nconst style = require('ansi-styles');\n\nconsole.log(style.green.open + 'Hello world!' + style.green.close);\n\n// color conversion between 16/256/truecolor\n// NOTE: if conversion goes to 16 colors or 256 colors, the original color\n// may be degraded to fit that color palette. This means terminals\n// that do not support 16 million colors will best-match the\n// original color.\nconsole.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close);\nconsole.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close);\nconsole.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close);\n```\n\n## API\n\nEach style has an `open` and `close` property.\n\n\n## Styles\n\n### Modifiers\n\n- `reset`\n- `bold`\n- `dim`\n- `italic` *(not widely supported)*\n- `underline`\n- `inverse`\n- `hidden`\n- `strikethrough` *(not widely supported)*\n\n### Colors\n\n- `black`\n- `red`\n- `green`\n- `yellow`\n- `blue`\n- `magenta`\n- `cyan`\n- `white`\n- `gray`\n\n### Background colors\n\n- `bgBlack`\n- `bgRed`\n- `bgGreen`\n- `bgYellow`\n- `bgBlue`\n- `bgMagenta`\n- `bgCyan`\n- `bgWhite`\n\n\n## Advanced usage\n\nBy default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.\n\n- `style.modifier`\n- `style.color`\n- `style.bgColor`\n\n\n###### Example\n\n```js\nconsole.log(style.color.green.open);\n```\n\n## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728)\n`ansi-styles` uses the [`color-convert`](https://github.com/MoOx/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors.\n\nTo use these, call the associated conversion function with the intended output, e.g.:\n\n```js\nstyle.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code\nstyle.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code\n\nstyle.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code\nstyle.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code\n\nstyle.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code\nstyle.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code\n```\n\n## Related\n\n- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal\n\n\n## License\n\nMIT В© [Sindre Sorhus](http://sindresorhus.com)\n",
  71. "readmeFilename": "readme.md",
  72. "bugs": {
  73. "url": "https://github.com/chalk/ansi-styles/issues"
  74. },
  75. "homepage": "https://github.com/chalk/ansi-styles",
  76. "_id": "ansi-styles@2.2.0",
  77. "_shasum": "c59191936e6ed1c1315a4b6b6b97f3acfbfa68b0",
  78. "_from": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.0.tgz",
  79. "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.0.tgz"
  80. }
Add Comment
Please, Sign In to add comment