pantone
Version:
Find the nearest PMS color using hex or rgb colors from CLI or as a dependency.
1 lines • 7.45 kB
JSON
{"note":"Don't delete this file! It's used internally to help with page regeneration.","body":"\r\n# PMS Pantone® Color Chart <sup>0.0.3</sup>\r\n\r\nFind the nearest PMS color using hex or rgb colors from command line or as a dependency. No need to use Photoshop anymore!\r\n\r\n\r\n\r\nInterested in buying a physical Pantone® color formula guide?<br />\r\n[Pantone GP1301XR Formula Guide Solid Coated and Solid Uncoated](http://www.amazon.com/gp/product/B007X7W3P8/ref=as_li_qf_sp_asin_tl?ie=UTF8&tag=aell-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=B007X7W3P8\")\r\n\r\n## Install\r\n\r\n```bash\r\nnpm install -g pantone\r\n```\r\n\r\n\r\n## CLI\r\n\r\nLet's try to find the nearest PMS color to [Teelaunch's][2] blue in hex:\r\n\r\n\r\n\r\n```bash\r\npantone --hex 2A70AE\r\n```\r\n\r\nOr we could use the rgb values:\r\n\r\n```bash\r\npantone --rgb 42,112,174\r\n```\r\n\r\nOutput in table format on command line:\r\n\r\n```bash\r\n┌───────┬─────────────────┬────┬─────┬─────┬────────┐\r\n│ dist │ name │ r │ g │ b │ hex │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0 │ Your query │ 42 │ 112 │ 174 │ 2A70AE │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.023 │ 660 │ 66 │ 107 │ 186 │ 426BBA │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.037 │ 2728 │ 51 │ 66 │ 181 │ 3342B5 │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.042 │ 285 │ 26 │ 117 │ 207 │ 1A75CF │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.046 │ 7455 │ 77 │ 89 │ 171 │ 4D59AB │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.05 │ 653 │ 54 │ 87 │ 140 │ 36578C │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.053 │ 7459 │ 71 │ 153 │ 181 │ 4799B5 │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.055 │ 641 │ 0 │ 120 │ 173 │ 0078AD │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.056 │ 307 │ 0 │ 120 │ 171 │ 0078AB │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.057 │ 647 │ 38 │ 87 │ 135 │ 265787 │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.058 │ 7462 │ 13 │ 92 │ 145 │ 0D5C91 │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.064 │ Process Blue 2X │ 0 │ 119 │ 191 │ 0077BF │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.064 │ 801 2X │ 0 │ 137 │ 175 │ 0089AF │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.064 │ 3015 │ 0 │ 102 │ 158 │ 00669E │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.065 │ 7468 │ 0 │ 121 │ 156 │ 00789C │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.066 │ 314 │ 0 │ 133 │ 161 │ 0085A1 │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.066 │ 633 │ 0 │ 128 │ 158 │ 00809E │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.066 │ 2945 │ 0 │ 87 │ 166 │ 0057A6 │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.07 │ 7473 │ 54 │ 163 │ 145 │ 36A391 │\r\n├───────┼─────────────────┼────┼─────┼─────┼────────┤\r\n│ 0.071 │ 640 │ 0 │ 140 │ 186 │ 008CBA │\r\n└───────┴─────────────────┴────┴─────┴─────┴────────┘\r\n```\r\n\r\n\r\n## Dependency\r\n\r\n**1.** Install npm module:\r\n\r\n```bash\r\ncd ~/project\r\nnpm install pantone\r\n```\r\n\r\n**2.** Require and lookup color:\r\n\r\n```js\r\n\r\nvar pantone = require('pantone')\r\n\r\n// rgb usage\r\n\r\npantone({ r: 42, g: 112, b: 174 }, rgbCallback)\r\n\r\nfunction rgbCallback(err, results) {\r\n if (err) throw new Error(err)\r\n console.log(results)\r\n}\r\n\r\n// hex usage\r\n\r\npantone({ hex: '#2A70AE' }, hexCallback) // you can also use `rgb` instead of `hex`\r\n\r\nfunction hexCallback(err, results) {\r\n if (err) throw new Error(err)\r\n console.log(results)\r\n}\r\n```\r\n\r\n\r\n## Notice\r\n\r\nPANTONE® and other Pantone, Inc. trademarks are the property of [Pantone, Inc.][1]\r\n\r\n[1]: http://www.pantone.com/\r\n[2]: https://teelaunch.com\r\n\r\n\r\n","name":"PMS Pantone Colors Chart","tagline":"Find the nearest PMS color using hex or rgb colors from CLI or as a dependency.PANTONE® and other Pantone, Inc. trademarks are the property of Pantone, Inc.","google":"UA-37325521-1"}