{"_id":"contrast-color","_rev":"4-844a5f164e78bbf8dff26dc78c7710fe","name":"contrast-color","dist-tags":{"latest":"1.0.1"},"versions":{"0.1.0":{"name":"contrast-color","description":"Determines the best contrast color to use. Give it a background color and it returns a foreground color (black or white by default but customizable).","license":"ISC","author":{"name":"Buster Collings","email":"busterc@gmail.com","url":"https://about.me/buster"},"repository":{"type":"git","url":"git+https://github.com/busterc/contrast-color.git"},"version":"0.1.0","main":"lib/index.js","scripts":{"prebuild":"rm -rf dist 2>/dev/null && mkdir dist","build":"parcel build lib/index.js --out-file contrastColor.js --global contrastColor --no-source-maps","postbuild":"NODE_ENV=BUILD jest","pretest":"eslint lib","test":"jest --coverage"},"devDependencies":{"coveralls":"^3.0.7","eslint":"^7.15.0","eslint-config-prettier":"^6.6.0","eslint-config-xo":"^0.33.1","eslint-plugin-compat":"^3.8.0","eslint-plugin-prettier":"^3.1.1","husky":"^4.3.4","jest":"^26.1.0","jest-given":"^1.0.0","lint-staged":"^10.5.3","parcel":"^1.12.4","prettier":"^2.2.1"},"keywords":["accessibility","background","black","bright","brighten","brightness","chroma","color","colors","contrast","convert","css","dark","darken","font","foreground","hex","hsl","hsv","light","lightness","luma","luminosity","rgb","text","wcag","white","yiq"],"engines":{"npm":">= 4.0.0"},"browserslist":["last 2 versions"],"eslintConfig":{"extends":["xo","prettier","plugin:compat/recommended"],"env":{"jest":true,"node":true,"browser":true},"rules":{"prettier/prettier":"error"},"plugins":["prettier"]},"husky":{"hooks":{"pre-commit":"lint-staged"}},"jest":{"testEnvironment":"jsdom"},"lint-staged":{"*.js":["eslint --fix","git add"],"*.json":["prettier --write","git add"]},"gitHead":"d1af0434156ef3170bd4b218ceea289dcd4ec610","bugs":{"url":"https://github.com/busterc/contrast-color/issues"},"homepage":"https://github.com/busterc/contrast-color#readme","_id":"contrast-color@0.1.0","_nodeVersion":"15.5.0","_npmVersion":"7.3.0","dist":{"integrity":"sha512-MdvlTTJDqM3jV1Aevnm5TN2VoR3DhxRosNuIZHtdHEwJVyQlj84qvdFDsij41c/2gdsdHlgWYcKJxa8dZuR8rw==","shasum":"7201fa428bc8bf1ed288c5e2bad9f450d9aefc3c","tarball":"https://registry.npmjs.org/contrast-color/-/contrast-color-0.1.0.tgz","fileCount":6,"unpackedSize":23723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAxdOCRA9TVsSAnZWagAAo1AP+gPaYq0DShbYhUiMPPfu\n3BzWiW/6G1vjCwUc9P7Ax8bZVKQBrhKxyKSdyED8MFNp9oJFDGn3LMJIlrxi\nAA82wEWyncdcbJvh9TEdLstP0hH21VUz0Gs0ni1fI3JQ92JY5+Cbqo3eQeh/\nkI6DQptzwOs5XKc61XjKty9WzfPde+DfepNbiXYynJtIPSwEJtzIWGAAxEoo\nGt7pFLlRDqAR//oqpug4RSiuuQAvIa9+yPGu4zs4OSDJoevH4i4klKzMr2I4\nmP4cwfchaDRADuRLzJkxeqfjLOF9K/QBNvt+e1Xb5gp2kTQzdJcIAhXVRnRV\nwi6HkDTBqv0OFmi8qkOTinxxDx9/1MCKj+mbXgJv7BWcuf6TOtUSkE7g06nG\nbpnZYmZR4XyZU1+ROjpSGrSwGKrBZ8BX9WWBvTzX4rbb/Q8MF5k/iKkyilr+\nD6xfw+4hGIgsxcY7Xy+IWjHEbd6vorkECWALthguKh35Zz9j3yujk20Q6VQS\n3J1dGWgQe/8HkoOkBBvD4Uxd4bPlxbwPuEckEjGa/tPzMGij9Qeb8VDVyfHc\nK8SON2uZYgDOeUm7I10DMbCJYtxnUXjG9D8AJE3jpZACK8nFQ9EMft0zEBgO\nselEdUJxjk5h0Qv+4Vq9aGOtUu7R3IMOLrT2N3V+Ordknzz266WIs8hrrHpE\nKkuE\r\n=6QwK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFhG1kD58oG34pcCybb6OBxkL41CmA41R3+XqvypC/Q5AiEAtP8rPNXh0td7OYGPOvEWHL4CEO7FiAm1aSxlPoHo+bw="}]},"_npmUser":{"name":"buster","email":"busterc@gmail.com"},"directories":{},"maintainers":[{"name":"buster","email":"busterc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/contrast-color_0.1.0_1610815309656_0.7555607856779205"},"_hasShrinkwrap":false},"0.1.1":{"name":"contrast-color","description":"Determines the best contrast color to use. Give it a background color and it returns a foreground color (black or white by default but customizable).","license":"ISC","author":{"name":"Buster Collings","email":"busterc@gmail.com","url":"https://about.me/buster"},"repository":{"type":"git","url":"git+https://github.com/busterc/contrast-color.git"},"version":"0.1.1","main":"lib/index.js","scripts":{"prebuild":"rm -rf dist 2>/dev/null && mkdir dist","build":"parcel build lib/index.js --out-file contrastColor.js --global ContrastColor --no-source-maps","postbuild":"NODE_ENV=BUILD jest","pretest":"eslint lib","test":"jest --coverage"},"devDependencies":{"coveralls":"^3.0.7","eslint":"^7.15.0","eslint-config-prettier":"^6.6.0","eslint-config-xo":"^0.33.1","eslint-plugin-compat":"^3.8.0","eslint-plugin-prettier":"^3.1.1","husky":"^4.3.4","jest":"^26.1.0","jest-given":"^1.0.0","lint-staged":"^10.5.3","parcel":"^1.12.4","prettier":"^2.2.1"},"keywords":["accessibility","background","black","bright","brighten","brightness","chroma","color","colors","contrast","convert","css","dark","darken","font","foreground","hex","hsl","hsv","light","lightness","luma","luminosity","rgb","text","wcag","white","yiq"],"engines":{"npm":">= 4.0.0"},"browserslist":["last 2 versions"],"eslintConfig":{"extends":["xo","prettier","plugin:compat/recommended"],"env":{"jest":true,"node":true,"browser":true},"rules":{"prettier/prettier":"error"},"plugins":["prettier"]},"husky":{"hooks":{"pre-commit":"lint-staged"}},"jest":{"testEnvironment":"jsdom"},"lint-staged":{"*.js":["eslint --fix","git add"],"*.json":["prettier --write","git add"]},"gitHead":"80b3044a2d2c4354bccf16b84fc3b19d1d492810","bugs":{"url":"https://github.com/busterc/contrast-color/issues"},"homepage":"https://github.com/busterc/contrast-color#readme","_id":"contrast-color@0.1.1","_nodeVersion":"15.5.0","_npmVersion":"7.3.0","dist":{"integrity":"sha512-Z+l7YGnGh6n5Qq7KTfehzvkFvQgTv1JqBxL+pGUlsiXYpGXIJC2mmFOyY8jbU2wswV3h6B5ay38Y4yyXWeC07w==","shasum":"7fa59bc8a4dd618e8bc21cdece2685e0142675ed","tarball":"https://registry.npmjs.org/contrast-color/-/contrast-color-0.1.1.tgz","fileCount":6,"unpackedSize":23723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAx8+CRA9TVsSAnZWagAAAfMP/jRC53UVlwgFEp9S8G0G\nY7PlJlg1yRFDnitdC/JjAa6Mwselsl+oAVR3UjQebrLhiDfLdYfjAEczibBH\nuWD5u98Ho9nVTxnr/PMCAjapW+CBcfhnJnETty7NevoWkfOUQ+DtnVkdZjFV\n6+bAyp7DSXY+dhHQlAQg+9DKV+tIoAN15mGoXBkCRRSUX4fY1OO9VJ7vCNfz\nQ/iWCaivBGQW0ZLFdjorl1cGxsYtmBZmDGG/0o5ISZHfvk0hhDwLPMahc0x0\nEmM/Jx2dgt2oTPeMwgJIaTLxMZq/+Ko55PhD4NLwx42wViWlz57s9Q9Hp7Vw\n5ma5uEb8WwpTvDTF/VsHT+Xy53NTT9IQul9h36ytPBJGpS54dHQD5iVNbMCp\nVj6HQwuizrYry34afSNlwWHMILBM2WMZ4gaAWffBLmXy+sTWoZVCjoENvdIU\nlcr56vY52Lg7GXD0AMZlGzGOCbHILXD9o1Dwj4Er/aqhxPNZZXa3BRwvoz6Y\nXCGxtVafEjlkbl09naVvvbyl7uVYo2WFrcVAiKKOBT13UlNkfF1LTbAX8KAr\nWm+rIVvhefrfdJqrZM0HIidaRQ+zUs80AJP4b+Ai31T9uXPTYdPvJcZM3+49\nmgFb8PR/wrMOx+VVcUDurbyU9k5toxki0mIPTvknibCigczB7VzlJyngob77\nYRyL\r\n=Rp6G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBymfqQ+xJQwGlLUCiVER1UnEYJaRG0S/F1n0lqmJOOdAiBtF2YSMi1iwhzBMSvNd+01E7DQtF+MZWtNHVx6EWnHrg=="}]},"_npmUser":{"name":"buster","email":"busterc@gmail.com"},"directories":{},"maintainers":[{"name":"buster","email":"busterc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/contrast-color_0.1.1_1610817341572_0.5535375403331724"},"_hasShrinkwrap":false},"1.0.0":{"name":"contrast-color","description":"Determines the best contrast color to use. Give it a background color and it returns a foreground color (black or white by default but customizable).","license":"ISC","author":{"name":"Buster Collings","email":"busterc@gmail.com","url":"https://about.me/buster"},"repository":{"type":"git","url":"git+https://github.com/busterc/contrast-color.git"},"version":"1.0.0","main":"lib/index.js","scripts":{"prebuild":"rm -rf dist 2>/dev/null && mkdir dist","build":"parcel build lib/index.js --out-file contrastColor.js --global ContrastColor --no-source-maps","postbuild":"NODE_ENV=BUILD jest","pretest":"eslint lib","test":"jest --coverage"},"devDependencies":{"coveralls":"^3.0.7","eslint":"^7.15.0","eslint-config-prettier":"^6.6.0","eslint-config-xo":"^0.33.1","eslint-plugin-compat":"^3.8.0","eslint-plugin-prettier":"^3.1.1","husky":"^4.3.4","jest":"^26.1.0","jest-given":"^1.0.0","lint-staged":"^10.5.3","parcel":"^1.12.4","prettier":"^2.2.1"},"keywords":["accessibility","background","black","bright","brighten","brightness","chroma","color","colors","contrast","convert","css","dark","darken","font","foreground","hex","hsl","hsv","light","lightness","luma","luminosity","rgb","text","wcag","white","yiq"],"engines":{"npm":">= 4.0.0"},"browserslist":["last 2 versions"],"eslintConfig":{"extends":["xo","prettier","plugin:compat/recommended"],"env":{"jest":true,"node":true,"browser":true},"rules":{"prettier/prettier":"error"},"plugins":["prettier"]},"husky":{"hooks":{"pre-commit":"lint-staged"}},"jest":{"testEnvironment":"jsdom"},"lint-staged":{"*.js":["eslint --fix","git add"],"*.json":["prettier --write","git add"]},"gitHead":"037a15039a47b1883792b8d99f0d4d6705e8b27c","bugs":{"url":"https://github.com/busterc/contrast-color/issues"},"homepage":"https://github.com/busterc/contrast-color#readme","_id":"contrast-color@1.0.0","_nodeVersion":"15.5.0","_npmVersion":"7.3.0","dist":{"integrity":"sha512-awyIWmcmg+EpGnW9VCxKmlCu2ePAr8Pb18D1lHmxSQDZM1uuzvJofoCiQXFro2NUPR4/f+t3r7Jn1R0uuaEVjQ==","shasum":"75685ff0158e1fa1b8ce9cb9f6394df18011b303","tarball":"https://registry.npmjs.org/contrast-color/-/contrast-color-1.0.0.tgz","fileCount":6,"unpackedSize":23818,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAy+eCRA9TVsSAnZWagAA0bYP/15rv+FnGOz6Pik6fjqS\nnkhOmVUVmz1IPbglenPcKsu65gvtYdHM/89f+yLQMPo/Vj5XtDi2oS3HxNqt\n+BdCzLrYiSQO4hWIqK5ZOUdASsCBkmU6XrCB6VgpLyeER11C/Zkn4qwBg4Ro\nVZd+u883aaFC1uA7CHeDi4TPH2N5ynJ/jUS6w8JWw18qPz9CXBB6A5jnt4oK\nYxARqLhsIWBac3tgqmdOWhS1PE/Dd4SAz5T1VtPPva4fxKGQzxC0vsAsHS0p\njKpR637lvAeBOijas163nrBAiXU0QwHsj/Rq2rbRYSxn+jzdcEqE8xZuZzh0\nKavLcd7chguF/X4A/8eyjkZqTN8gJhJVFhtysEIzNbTxnEc/Z3w9HhuqKL5H\nF05sqdMkSpQG7sCOpezS7RLUfp/PYgHNkebJss76a6AKKLF2nRNzrGybdcUQ\nczvfhgObw5mzvyz0zfk7uc26migPaBohFVGiQwqzJNxFy2CEHle+92joq9Ai\nNPdgioS3LBFKJbhd2cRpYLC+GC1itIftKdIXcgQK1l8B6pQ57Hr0q12C3NJV\nxm+HQfeQsxBUUIMnCsPi0jcdiV5G8Hvn7IM0OBcm5pJl4guG8d6GyzTLUshT\n6YBLjwsR7HaCtr8CpKeEAepgabLwcaPblrF352IzEXOiAfuED6S1jnpac71/\nG707\r\n=nMVW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHJNh2cI9NFvYEpY9t0x013LcEF2bQv7OL/OOsXLRCr+AiEAheKxQqVog9liglntxlBdhpM7IMr7dBH/5lZn+LuYoBo="}]},"_npmUser":{"name":"buster","email":"busterc@gmail.com"},"directories":{},"maintainers":[{"name":"buster","email":"busterc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/contrast-color_1.0.0_1610821534478_0.8699242801702469"},"_hasShrinkwrap":false},"1.0.1":{"name":"contrast-color","description":"Determines the best contrast color to use. Give it a background color and it returns a foreground color (black or white by default but customizable).","license":"ISC","author":{"name":"Buster Collings","email":"busterc@gmail.com","url":"https://about.me/buster"},"repository":{"type":"git","url":"git+https://github.com/busterc/contrast-color.git"},"version":"1.0.1","main":"lib/index.js","scripts":{"prebuild":"rm -rf dist 2>/dev/null && mkdir dist","build":"parcel build lib/index.js --out-file contrastColor.js --global ContrastColor --no-source-maps","postbuild":"NODE_ENV=BUILD jest","pretest":"eslint lib","test":"jest --coverage"},"devDependencies":{"coveralls":"^3.0.7","eslint":"^7.15.0","eslint-config-prettier":"^6.6.0","eslint-config-xo":"^0.33.1","eslint-plugin-compat":"^3.8.0","eslint-plugin-prettier":"^3.1.1","husky":"^4.3.4","jest":"^26.1.0","jest-given":"^1.0.0","lint-staged":"^10.5.3","parcel":"^1.12.4","prettier":"^2.2.1"},"keywords":["accessibility","background","black","bright","brighten","brightness","chroma","color","colors","contrast","convert","css","dark","darken","font","foreground","hex","hsl","hsv","light","lightness","luma","luminosity","rgb","text","wcag","white","yiq"],"engines":{"npm":">= 4.0.0"},"browserslist":["last 2 versions"],"eslintConfig":{"extends":["xo","prettier","plugin:compat/recommended"],"env":{"jest":true,"node":true,"browser":true},"rules":{"prettier/prettier":"error"},"plugins":["prettier"]},"husky":{"hooks":{"pre-commit":"lint-staged"}},"jest":{"testEnvironment":"jsdom"},"lint-staged":{"*.js":["eslint --fix","git add"],"*.json":["prettier --write","git add"]},"gitHead":"c937635bb14f6b8fc2b0260f4cb8ce925fe401d8","bugs":{"url":"https://github.com/busterc/contrast-color/issues"},"homepage":"https://github.com/busterc/contrast-color#readme","_id":"contrast-color@1.0.1","_nodeVersion":"15.5.0","_npmVersion":"7.3.0","dist":{"integrity":"sha512-XeTV/LiyWrf/OWnODTqve2YGBfg32N6zlLqQjJKmEY+ffDqIfecgdmluVz7tky1D4VEaweZgoeRJJT87gDSDCQ==","shasum":"15fd7b444f43ccb7d6175d7e131d095623a9f146","tarball":"https://registry.npmjs.org/contrast-color/-/contrast-color-1.0.1.tgz","fileCount":6,"unpackedSize":23810,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDt5eCRA9TVsSAnZWagAA2EMQAKPWJjSAxmMOxvYA5et2\nJyL8R8r0bPqXN2Bkw1F9CstM4pumsj6nXpNBkoxxCzgT0gxsQYZJMoYwNuz2\nbLRUt4MMhE0zI+NGXyViU2WrA6kGpI9jA2lAwl77peEnS7ZfMITgCjze2uk9\n6eyrPXPstgpGnho5cGO7PWuh6iX9KT+n+TvZ5gTSIwcNeJocBKK/9G9EDZ2B\n6r+bDN3tWkuKWq0bDnxBHECA+VRVolfHGp7QoH751S/auNTGdIZAWqR/7kJ6\nTjSI/OCukfUvZ+Ew6Yjv8gI4vJfCfsk0sdgrNffJUTxRL1W0Wq4ewRAHt6Ma\nJw9wSiwqYOpbpAYQ+KPX1QDSv6pxxpzQcQWDlrpCvqYRYwsEPcAI1VdEyAx/\n+w6yh0SOyfQx4pJjF6Ad/Ux+voWBb8ES/IlAIPegmXg/LjTsJ1ossefPy7Pv\nspA/bGjUTQQfsfmeOerIc/OlcUYj9uBUVM8bb/2EU27w+AQEXe0rDKiBHJr8\nEJLaFG5LD82PKL27W3BIqRFus3htEpF3zq1ItwIuRDcbEya/O8uzzphB4bIH\nJlPgoIg42IT87vH2BYct7Y64gQiAa1QwPCzqsbFv3VCEg6tPBYT5TYpdqxOl\n9xqpobaF3Pltq3rDcqRqpIx+guRxRfWRBizmg95aMN1pzKBlq/HqvuVx2QJg\nJzNT\r\n=1Qzf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFRKHFMqp1XR/7pDdaDSCuRckJSlFrErg/Fj7kthDaBXAiEAsoRVx5UgbhAXbbmClKrZWcDxuAiigKzzVaMKVRVxHWE="}]},"_npmUser":{"name":"buster","email":"busterc@gmail.com"},"directories":{},"maintainers":[{"name":"buster","email":"busterc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/contrast-color_1.0.1_1611587165807_0.8304468185439842"},"_hasShrinkwrap":false}},"time":{"created":"2021-01-16T16:41:49.656Z","0.1.0":"2021-01-16T16:41:49.772Z","modified":"2022-04-27T16:20:20.953Z","0.1.1":"2021-01-16T17:15:41.759Z","1.0.0":"2021-01-16T18:25:34.622Z","1.0.1":"2021-01-25T15:06:05.906Z"},"maintainers":[{"name":"buster","email":"busterc@gmail.com"}],"description":"Determines the best contrast color to use. Give it a background color and it returns a foreground color (black or white by default but customizable).","homepage":"https://github.com/busterc/contrast-color#readme","keywords":["accessibility","background","black","bright","brighten","brightness","chroma","color","colors","contrast","convert","css","dark","darken","font","foreground","hex","hsl","hsv","light","lightness","luma","luminosity","rgb","text","wcag","white","yiq"],"repository":{"type":"git","url":"git+https://github.com/busterc/contrast-color.git"},"author":{"name":"Buster Collings","email":"busterc@gmail.com","url":"https://about.me/buster"},"bugs":{"url":"https://github.com/busterc/contrast-color/issues"},"license":"ISC","readme":"# contrast-color [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url]\n> Determines the best contrast color to use. Give it a background color and it returns a foreground color (black or white by default but customizable).\n\n## FYI\n\n- [YIQ](https://en.wikipedia.org/wiki/YIQ#:~:text=YIQ%20is%20the%20color%20space,used%20in%20quadrature%20amplitude%20modulation.)\n- [Calculating Color Contrast](https://24ways.org/2010/calculating-color-contrast/)\n\n## Demo ([try it for yourself](https://codepen.io/buster/pen/PoGXdze))\n![](contrastColor.gif)\n\n## Installation\n\n```sh\n$ npm install contrast-color\n```\n\n## Usage\n\n```js\n// Use via class instance\nconst ContrastColor = require('contrast-color');\nconst cc = new ContrastColor({\n  bgColor: \"navy\",\n  fgDarkColor: \"navy\",\n  fgLightColor: \"water\",\n  customNamedColors: {\n    water: \"#00D0FF\",\n  },\n});\n\nconst defaultFgColor = cc.contrastColor();\nconst hasAquaBgColor = cc.contrastColor({ bgColor: \"aqua\" });\n\n/* Results\n{\n  defaultFgColor: '#00D0FF', // water\n  hasAquaBgColor: '#000080'  // navy\n}\n*/\n\n// OR ...\n\n// Use via static method\nconst { contrastColor } = require('contrast-color');\n\nconst hasRedBg = contrastColor({ bgColor: '#f00' });\nconst hasRedBgWithBlackFg = contrastColor({ bgColor: '#f00', threshold: 76 });\nconst hasYellowBg = contrastColor({ bgColor: 'yellow' });\nconst hasWhiteBgWithGreenFg = contrastColor({ fgDarkColor: '#008000' });\nconst hasBlackBgWithLimeFg = contrastColor({ bgColor: '#000000', fgLightColor: 'lime' });\nconst hasKitchenSink = contrastColor({ \n  bgColor: '#808080', \n  fgDarkColor: 'dirty', \n  fgLightColor: 'clean', \n  threshold: 129, \n  customNamedColors: { \n    dirty: '#f90', \n    clean: '#ff99ff' \n  } \n});\n\n/* Results:\n{\n  hasRedBg: '#FFFFFF',              // white\n  hasRedBgWithBlackFg: '#000000',   // black\n  hasYellowBg: '#000000',           // black\n  hasWhiteBgWithGreenFg: '#008000', // green\n  hasBlackBgWithLimeFg: '#00FF00',  // lime\n  hasKitchenSink: '#ff99ff'         // clean\n}\n*/\n```\n\n## API\n\n### ContrastColor(defaults)\n\n- #### defaults \n\n  `Optional`: `Object` with parameters to use.\n\n  - ##### bgColor\n\n    - `Optional` : `String` hex or named (e.g.`#ff0000`, `red`)\n    - `Default`  : `#FFFFFF`\n\n  - ##### fgDarkColor\n\n    Is returned if `bgColor` is determined to be _light_\n\n    - `Optional` : `String` hex or named (e.g.`#ff0000`, `red`)\n    - `Default`  : `#000000`\n\n  - ##### fgLightColor\n\n    Is returned if `bgColor` is determined to be _dark_\n\n    - `Optional` : `String` hex or named (e.g.`#ff0000`, `red`)\n    - `Default`  : `#FFFFFF`\n\n  - ##### defaultColor\n\n    Is returned if `bgColor` is determined to be _invalid_\n\n    - `Optional` : `String` hex or named (e.g.`#ff0000`, `red`)\n    - `Default`  : `#000000`\n\n  - ##### threshold\n\n    - `Optional` : `Number` (0-255) used to adjust variance\n    - `Default`  : `128`\n\n  - ##### customNamedColors\n\n    - `Optional` : `Object` used to override or add named colors (e.g. `{ blue: \"#0074D9\" }`)\n\n\n### .contrastColor(options)\n\n- #### options \n\n  `Requrired`: `Object` with parameters to use.\n\n  - ##### bgColor\n\n    - `Required` : `String` hex or named (e.g.`#ff0000`, `red`)\n\n  - ##### fgDarkColor\n\n    Is returned if `bgColor` is determined to be _light_\n\n    - `Optional` : `String` hex or named (e.g.`#ff0000`, `red`)\n    - `Default`  : `#000000`\n\n  - ##### fgLightColor\n\n    Is returned if `bgColor` is determined to be _dark_\n\n    - `Optional` : `String` hex or named (e.g.`#ff0000`, `red`)\n    - `Default`  : `#FFFFFF`\n\n  - ##### defaultColor\n\n    Is returned if `bgColor` is determined to be _invalid_\n\n    - `Optional` : `String` hex or named (e.g.`#ff0000`, `red`)\n    - `Default`  : `#000000`\n\n  - ##### threshold\n\n    - `Optional` : `Number` (0-255) used to adjust variance\n    - `Default`  : `128`\n\n  - ##### customNamedColors\n\n    - `Optional` : `Object` used to override or add named colors (e.g. `{ blue: \"#0074D9\" }`)\n\n\n## License\n\nISC © [Buster Collings]()\n\n\n[npm-image]: https://badge.fury.io/js/contrast-color.svg\n[npm-url]: https://npmjs.org/package/contrast-color\n[travis-image]: https://travis-ci.com/busterc/contrast-color.svg?branch=master\n[travis-url]: https://travis-ci.com/busterc/contrast-color\n[daviddm-image]: https://david-dm.org/busterc/contrast-color.svg?theme=shields.io\n[daviddm-url]: https://david-dm.org/busterc/contrast-color\n[coveralls-image]: https://coveralls.io/repos/busterc/contrast-color/badge.svg\n[coveralls-url]: https://coveralls.io/r/busterc/contrast-color\n","readmeFilename":"README.md"}