{"id":23505345,"url":"https://github.com/nabeghe/colory-php","last_synced_at":"2026-01-28T23:01:49.180Z","repository":{"id":264267829,"uuid":"876962138","full_name":"nabeghe/colory-php","owner":"nabeghe","description":"Simple colors helper for PHP.","archived":false,"fork":false,"pushed_at":"2025-07-02T22:24:00.000Z","size":3,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-11T22:41:45.254Z","etag":null,"topics":["color","colors","php","php-color","php-colors","php-libraries","php-library"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/nabeghe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-22T21:06:34.000Z","updated_at":"2025-07-02T22:24:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"82aed839-9454-43b7-9e65-035f997e8c06","html_url":"https://github.com/nabeghe/colory-php","commit_stats":null,"previous_names":["nabeghe/colory-php"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nabeghe/colory-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabeghe%2Fcolory-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabeghe%2Fcolory-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabeghe%2Fcolory-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabeghe%2Fcolory-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nabeghe","download_url":"https://codeload.github.com/nabeghe/colory-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabeghe%2Fcolory-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28854426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T22:56:21.783Z","status":"ssl_error","status_checked_at":"2026-01-28T22:56:00.861Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["color","colors","php","php-color","php-colors","php-libraries","php-library"],"created_at":"2024-12-25T09:32:24.035Z","updated_at":"2026-01-28T23:01:49.176Z","avatar_url":"https://github.com/nabeghe.png","language":"PHP","readme":"# Colory for PHP.\n\n\u003e Simple colors helper for PHP.\n\nGenerating random RGB \u0026 HEX colors with alpha capability,\nInverting RGB and HEX colors, converting between RGB and HEX colors \u0026\nperhaps more features in the future.\n\n## 🫡 Usage\n\n### 🚀 Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require nabeghe/colory\n```\n\n#### Example:\n\n```php\nuse Nabeghe\\Colory\\Colory;\n\necho \"[[ Random RBG ]]\\n\";\necho \"\u003e Random RBG =\u003e \".json_encode(Colory::randomRgb()).\"\\n\";\necho \"\u003e Random RGBA =\u003e \".json_encode(Colory::randomRgb(true)).\"\\n\";\necho '\u003e Random RGB for CSS =\u003e '.json_encode(Colory::randomRgbCss()).\"\\n\";\necho '\u003e Random RGBA for CSS =\u003e '.json_encode(Colory::randomRgbCss(true)).\"\\n\";\necho \"\\n\";\n\necho \"[[ Random Hex ]]\\n\";\necho '\u003e Random Hex =\u003e '.json_encode(Colory::randomHex()).\"\\n\";\necho '\u003e Random Hex With Alpha =\u003e '.json_encode(Colory::randomHex(true)).\"\\n\";\necho \"\\n\";\n\necho \"[[ Invert RGB ]]\\n\";\n$random_rgb = Colory::randomRgb();\necho \"\u003e Invert RGB ($random_rgb[r], $random_rgb[g], $random_rgb[b]) =\u003e \".json_encode(Colory::invertRgb($random_rgb)).\"\\n\";\n$random_rgba = Colory::randomRgb(true);\necho \"\u003e Invert RGBA ($random_rgba[r], $random_rgba[g], $random_rgba[b], $random_rgba[a]) =\u003e \".json_encode(Colory::invertRgb($random_rgba)).\"\\n\";\necho \"\u003e Invert RGBA (nabeghe/colory) =\u003e \".json_encode(Colory::invertRgb('nabeghe/colory')).\"\\n\";\necho \"\\n\";\n\necho \"[[ Invert HEX ]]\\n\";\n$random_hex = Colory::randomHex();\necho \"\u003e Invert HEX ($random_hex) =\u003e \".json_encode(Colory::invertHex($random_hex)).\"\\n\";\n$random_hexa = Colory::randomHex(true);\necho \"\u003e Invert HEX ($random_hexa) =\u003e \".json_encode(Colory::invertHex($random_hexa)).\"\\n\";\necho '\u003e Invert HEX (#EEE) =\u003e '.json_encode(Colory::invertHex('#EEE')).\"\\n\";\necho '\u003e Invert HEX (#eee) =\u003e '.json_encode(Colory::invertHex('#eee')).\"\\n\";\necho '\u003e Invert HEX (#FFF) =\u003e '.json_encode(Colory::invertHex('#FFF')).\"\\n\";\necho '\u003e Invert HEX (#fff) =\u003e '.json_encode(Colory::invertHex('#fff')).\"\\n\";\necho '\u003e Invert HEX (#ff573380) =\u003e '.json_encode(Colory::invertHex('#ff573380')).\"\\n\";\necho '\u003e Invert HEX (nabeghe/colory) =\u003e '.json_encode(Colory::invertHex('nabeghe/colory')).\"\\n\"; // null\necho \"\\n\";\n\necho \"[[ RGB To HEX ]]\\n\";\n$random_rgb = Colory::randomRgb();\necho \"\u003e RGB To HEX ($random_rgb[r], $random_rgb[g], $random_rgb[b]) =\u003e \".Colory::rgbToHex($random_rgb).\"\\n\";\n$random_rgba = Colory::randomRgb(true);\necho \"\u003e RGB To HEX ($random_rgba[r], $random_rgba[g], $random_rgba[b], $random_rgba[a]) =\u003e \".json_encode(Colory::rgbToHex($random_rgba)).\"\\n\";\necho \"\u003e RGB To HEX (nabeghe/colory) =\u003e \".json_encode(Colory::rgbToHex('nabeghe/colory')).\"\\n\";\necho \"\\n\";\n\necho \"[[ HEX To RGB ]]\\n\";\n$random_hex = Colory::randomHex();\necho \"\u003e HEX To RGB ($random_hex) =\u003e \".json_encode(Colory::hexToRgb($random_hex)).\"\\n\";\n$random_hexa = Colory::randomHex(true);\necho \"\u003e HEX To RGB ($random_hexa) =\u003e \".json_encode(Colory::hexToRgb($random_hexa)).\"\\n\";\necho \"\u003e HEX To RGB (nabeghe/colory) =\u003e \".json_encode(Colory::hexToRgb('nabeghe/colory')).\"\\n\";\necho \"\\n\";\n```\n\n## 📖 License\n\nLicensed under the MIT license, see [LICENSE.md](LICENSE.md) for details.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnabeghe%2Fcolory-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnabeghe%2Fcolory-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnabeghe%2Fcolory-php/lists"}