{"id":16731419,"url":"https://github.com/skratchdot/color-quantize","last_synced_at":"2025-04-10T11:13:46.169Z","repository":{"id":57203315,"uuid":"21081538","full_name":"skratchdot/color-quantize","owner":"skratchdot","description":"Convert colors to websafe / websmart values","archived":false,"fork":false,"pushed_at":"2016-08-28T10:49:48.000Z","size":6,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-20T22:08:20.455Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skratchdot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-21T23:59:49.000Z","updated_at":"2018-12-10T01:28:55.000Z","dependencies_parsed_at":"2022-09-17T00:51:44.578Z","dependency_job_id":null,"html_url":"https://github.com/skratchdot/color-quantize","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skratchdot%2Fcolor-quantize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skratchdot%2Fcolor-quantize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skratchdot%2Fcolor-quantize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skratchdot%2Fcolor-quantize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skratchdot","download_url":"https://codeload.github.com/skratchdot/color-quantize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208570,"owners_count":21065203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T23:37:02.814Z","updated_at":"2025-04-10T11:13:46.118Z","avatar_url":"https://github.com/skratchdot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# color-quantize\n\n[![NPM version](https://badge.fury.io/js/color-quantize.svg)](http://badge.fury.io/js/color-quantize)\n[![Build Status](https://travis-ci.org/skratchdot/color-quantize.png?branch=master)](https://travis-ci.org/skratchdot/color-quantize)\n[![Code Climate](https://codeclimate.com/github/skratchdot/color-quantize.png)](https://codeclimate.com/github/skratchdot/color-quantize)\n[![Coverage Status](https://coveralls.io/repos/skratchdot/color-quantize/badge.png)](https://coveralls.io/r/skratchdot/color-quantize)\n[![Dependency Status](https://david-dm.org/skratchdot/color-quantize.svg)](https://david-dm.org/skratchdot/color-quantize)\n[![devDependency Status](https://david-dm.org/skratchdot/color-quantize/dev-status.svg)](https://david-dm.org/skratchdot/color-quantize#info=devDependencies)\n\n[![NPM](https://nodei.co/npm/color-quantize.png)](https://npmjs.org/package/color-quantize)\n\n\n## Description\n\nConvert colors to websafe / websmart values\n\n\n## Getting Started\n\nInstall the module with: `npm install color-quantize`\n\n```javascript\nvar colorQuantize = require('color-quantize');\ncolorQuantize.websafe('#cd1289'); // \"#CC0099\"\ncolorQuantize.websmart('#cd1289'); // \"#CC1188\"\n```\n\n\n## Documentation\n\nThis library uses the [onecolor](https://github.com/One-com/one-color) parser,\nso colorString can in many different formats (i.e. #ff00cc, rgb(13,42,255), etc).\n\n#### colorQuantize.websafe(colorString)\n\nReturn a hex code from the 216 web-safe color palette.\n\ncolorString can be in any format supported by [onecolor](https://github.com/One-com/one-color).\n\nSame as calling: `colorQuantize.quantize(colorString, 51)`\n\n#### colorQuantize.websmart(colorString)\n\nReturn a hex code from the 4096 web-smart color palette.\n\ncolorString can be in any format supported by [onecolor](https://github.com/One-com/one-color).\n\nSame as calling: `colorQuantize.quantize(colorString, 17)`\n\n#### colorQuantize.quantize(colorString, quantizeAmount)\n\nQuantize a colorString by the given quantizeAmount.\n\ncolorString can be in any format supported by [onecolor](https://github.com/One-com/one-color).\n\nquantizeAmount must be an integer.\n\n\n## Additional Links\n\n- [4096 Web Smart Colors](http://cloford.com/resources/colours/websmart1.htm)\n- [Original Inspiration](http://mudcu.be/sphere/)\n\n\n## Release History\n\n#### v0.1.0 - Released June 21, 2014\n\n- initial release\n\n\n## License\nCopyright (c) 2014 skratchdot  \nLicensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskratchdot%2Fcolor-quantize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskratchdot%2Fcolor-quantize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskratchdot%2Fcolor-quantize/lists"}