{"id":15412164,"url":"https://github.com/maymeow/php-color","last_synced_at":"2025-06-20T20:36:00.792Z","repository":{"id":62525820,"uuid":"233197438","full_name":"MayMeow/php-color","owner":"MayMeow","description":"🌈 Color conversion from RGB to HEX and back.","archived":false,"fork":false,"pushed_at":"2020-01-11T12:03:37.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-02T04:24:25.272Z","etag":null,"topics":["color","hex","php","php-library","rgb"],"latest_commit_sha":null,"homepage":null,"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/MayMeow.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":"2020-01-11T08:03:47.000Z","updated_at":"2020-01-11T12:05:13.000Z","dependencies_parsed_at":"2022-11-02T14:16:09.777Z","dependency_job_id":null,"html_url":"https://github.com/MayMeow/php-color","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/MayMeow%2Fphp-color","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MayMeow%2Fphp-color/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MayMeow%2Fphp-color/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MayMeow%2Fphp-color/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MayMeow","download_url":"https://codeload.github.com/MayMeow/php-color/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245960815,"owners_count":20700781,"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":["color","hex","php","php-library","rgb"],"created_at":"2024-10-01T16:51:30.306Z","updated_at":"2025-03-28T03:15:41.166Z","avatar_url":"https://github.com/MayMeow.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Color\n\n🌈 Color conversion from RGB to HEX and back.\n\n## Instalation\n\nTrough composer:\n\n```\ncomposer require maymeow/php-color\n```\n\n## Using\n\nConvert color to hex\n\n```php\nuse MayMeow\\PHPColor\\Color;\n// ...\n$color = new Color(198, 255, 32);\n$hex = Color::convertToHex($color); //#c6ff20\n```\n\nand back to RGB\n\n```php\nuse MayMeow\\PHPColor\\Color;\n// ...\ntry {\n    $rgb = Color::convertToRGB($hex); // color object: Color(198, 255, 32)\n} catch (\\MayMeow\\PHPColor\\Exceptions\\NotHexException $exception)\n{\n    // do something, echo message or log ...\n}\n\n```\n\nYou can check `example.php` file in project sources.\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaymeow%2Fphp-color","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaymeow%2Fphp-color","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaymeow%2Fphp-color/lists"}