{"id":32390801,"url":"https://github.com/e-/hsi.js","last_synced_at":"2025-10-25T04:52:29.436Z","repository":{"id":142299264,"uuid":"2591485","full_name":"e-/hsi.js","owner":"e-","description":"RGB\u003c-\u003eHSI convert javascript library","archived":false,"fork":false,"pushed_at":"2015-01-02T06:42:40.000Z","size":107,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-03-13T05:31:11.083Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/e-.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-10-17T12:11:33.000Z","updated_at":"2023-03-13T05:35:42.068Z","dependencies_parsed_at":"2023-03-13T10:10:25.680Z","dependency_job_id":null,"html_url":"https://github.com/e-/hsi.js","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/e-/hsi.js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e-%2Fhsi.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e-%2Fhsi.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e-%2Fhsi.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e-%2Fhsi.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/e-","download_url":"https://codeload.github.com/e-/hsi.js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e-%2Fhsi.js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280906445,"owners_count":26411413,"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","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-10-25T04:51:35.471Z","updated_at":"2025-10-25T04:52:29.431Z","avatar_url":"https://github.com/e-.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"hsi.js is a small javascript library which converts HSI and RGB to each other.\n\n## Examples\n\n### Conversion from RGB to HSI\n\n\u003cpre\u003e\u003ccode\u003e\n\thsi = toHSI(255, 0, 0); // [0, 1, 0.3333]\n\u003c/code\u003e\u003c/pre\u003e\n\nyou can use various RGB formats.\n\u003cpre\u003e\u003ccode\u003e\n\thsi1 = toHSI(255, 0, 0);\n\n\thsi2 = toHSI([255, 0, 0]);\n\thsi3 = toHSI('#FF0000');\n\thsi4 = toHSI('#ff0000');\n\thsi5 = toHSI('rgb(255,0,0)');\t\n\n\t// all results will be the same. [0, 1, 0.3333]\n\u003c/code\u003e\u003c/pre\u003e\n\n### Conversion from HSI to RGB\n\n\u003cpre\u003e\u003ccode\u003e\n\trgb1 = toRGB(0, 1, 0.3333); // [255, 0, 0]\n\trgb2 = toRGB([0, 1, 0.3333]); // [255, 0, 0]\n\n\tpink = toRGB(300, 1, 0.6666); // [255, 0, 255]\n\u003c/code\u003e\u003c/pre\u003e\n\n### Other Usages\n\nyou can generate colors using HSI features.\n\n\u003cpre\u003e\u003ccode\u003e\n\t//generate pastel-tone color.\n\tpastel = toRGB(Math.floor(Math.random() * 360), 0.3, 1); \n\n\t//generate vivid color.\n\tvivid = toRGB(Math.floor(Math.random() * 360), 1, 1);\n\u003c/code\u003e\u003c/pre\u003e\n\n## Tested Environments\n\n- Safari\n- Google Chrome \n- Internet Explorer 6+\n- FireFox\n\n## Licences\n### GPL\nhsi.js (HSI \u003c-\u003e RGB conversion javascript library)\nCopyright (C) 2011-2015 Jaemin Jo\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fe-%2Fhsi.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fe-%2Fhsi.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fe-%2Fhsi.js/lists"}