{"id":18304655,"url":"https://github.com/numtel/colorswap.js","last_synced_at":"2025-06-23T15:34:42.859Z","repository":{"id":20726223,"uuid":"24010361","full_name":"numtel/colorswap.js","owner":"numtel","description":"Instantly replace colors on your page!","archived":false,"fork":false,"pushed_at":"2014-10-03T03:12:59.000Z","size":180,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"gh-pages","last_synced_at":"2025-04-09T10:42:25.063Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://numtel.github.io/colorswap.js/","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/numtel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-14T01:05:58.000Z","updated_at":"2020-03-17T12:32:36.000Z","dependencies_parsed_at":"2022-09-11T03:40:59.407Z","dependency_job_id":null,"html_url":"https://github.com/numtel/colorswap.js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/numtel/colorswap.js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numtel%2Fcolorswap.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numtel%2Fcolorswap.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numtel%2Fcolorswap.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numtel%2Fcolorswap.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/numtel","download_url":"https://codeload.github.com/numtel/colorswap.js/tar.gz/refs/heads/gh-pages","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numtel%2Fcolorswap.js/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261505100,"owners_count":23168961,"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-11-05T15:29:52.081Z","updated_at":"2025-06-23T15:34:42.841Z","avatar_url":"https://github.com/numtel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# colorswap.js\n\nView demo at http://numtel.github.io/colorswap.js/\n\nA find/replace operation for all loaded stylesheets specialized for swapping colors globally.\n\n### Installation\n\nOnly dependency is [tinycolor](http://bgrins.github.io/TinyColor/)\n\n    \u003cscript src=\"tinycolor.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"colorswap.js\"\u003e\u003c/script\u003e\n\nAlso available as a Meteor Package ([more information](https://github.com/numtel/meteor-colorswap))\n\n    meteor add numtel:colorswap\n\n### Usage\n\nThe find color is the original color. Subsequent calls to replace the color still specify the color in the original CSS. View this page's source for an example.\n\n    ColorSwap({\n      find: '#428bca', // hex, rgb(), hsv(), hsl()\n      replace: '#f00', // hex, rgb(), hsv(), hsl()\n      animation: 'hsl' // optional: 'none', 'rgb', 'hsv', 'hsl'\n      duration: 400 // optional: milliseconds to complete animation\n      frameDuration: 10 // optional: milliseconds per frame in animation\n    });\n\nPass an array of colors to the `find` option to replace multiple colors. The first color will be used to adjust the HSL values relative to the remaining colors, preserving shading effects.\n\n### Caveats\n\n\n* Only works with CSS rules in files from the same origin due to security restrictions.\n* HSL, HSV animations could use some work in between red and blue.\n\n### Changelog\n\n* 1.0.2: Fixed normalize function so relative colors do not go out of bounds\n* 1.0.1: Support for multiple colors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumtel%2Fcolorswap.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnumtel%2Fcolorswap.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumtel%2Fcolorswap.js/lists"}