{"id":17061795,"url":"https://github.com/phlak/colorizer","last_synced_at":"2025-08-21T18:33:43.086Z","repository":{"id":15805231,"uuid":"18544734","full_name":"PHLAK/Colorizer","owner":"PHLAK","description":"PHP library for generating persistantly unique colors from a string.","archived":false,"fork":false,"pushed_at":"2024-12-06T18:53:58.000Z","size":133,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-06T20:58:22.586Z","etag":null,"topics":["color","persistent-colors","php"],"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/PHLAK.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-04-08T04:00:44.000Z","updated_at":"2024-12-06T18:54:01.000Z","dependencies_parsed_at":"2024-11-07T15:03:15.555Z","dependency_job_id":"4bdd27f0-9c5c-496c-9c6c-b9490e24dc71","html_url":"https://github.com/PHLAK/Colorizer","commit_stats":{"total_commits":96,"total_committers":4,"mean_commits":24.0,"dds":0.03125,"last_synced_commit":"626cb00963f77be2fb1d28fbb8b0182dfba0fb54"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHLAK%2FColorizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHLAK%2FColorizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHLAK%2FColorizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHLAK%2FColorizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PHLAK","download_url":"https://codeload.github.com/PHLAK/Colorizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230527875,"owners_count":18240052,"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","persistent-colors","php"],"created_at":"2024-10-14T10:48:12.669Z","updated_at":"2024-12-20T03:10:20.585Z","avatar_url":"https://github.com/PHLAK.png","language":"PHP","funding_links":["https://paypal.me/ChrisKankiewicz"],"categories":[],"sub_categories":[],"readme":"Colorizer\n=========\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"colorizer.png\" alt=\"Colorizer\" width=\"66%\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/PHLAK/Colorizer/discussions\"\u003e\u003cimg src=\"https://img.shields.io/badge/Join_the-Community-7b16ff.svg?style=for-the-badge\" alt=\"Join our Community\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/users/PHLAK/sponsorship\"\u003e\u003cimg src=\"https://img.shields.io/badge/Become_a-Sponsor-cc4195.svg?style=for-the-badge\" alt=\"Become a Sponsor\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://paypal.me/ChrisKankiewicz\"\u003e\u003cimg src=\"https://img.shields.io/badge/Make_a-Donation-006bb6.svg?style=for-the-badge\" alt=\"One-time Donation\"\u003e\u003c/a\u003e\n    \u003cbr\u003e\n    \u003ca href=\"https://packagist.org/packages/PHLAK/Colorizer\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/PHLAK/Colorizer.svg?style=flat-square\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://packagist.org/packages/PHLAK/Colorizer\"\u003e\u003cimg src=\"https://img.shields.io/packagist/dt/PHLAK/Colorizer.svg?style=flat-square\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/PHLAK/Colorizer/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/PHLAK/Colorizer.svg?style=flat-square\" alt=\"License\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/PHLAK/Colorizer/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/PHLAK/Colorizer/test-suite.yaml?style=flat-square\" alt=\"Build Status\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n\u003cp align=\"center\"\u003e\n    Generate persistently unique colors from a string.\n    \u003cbr\u003e\n    Created by \u003ca href=\"https://www.ChrisKankiewicz.com\"\u003eChris Kankiewicz\u003c/a\u003e (\u003ca href=\"https://twitter.com/PHLAK\"\u003e@PHLAK\u003c/a\u003e)\n\u003c/p\u003e\n\n---\n\nRequirements\n------------\n\n  - [PHP](https://php.net) \u003e= 8.1\n\nInstall with Composer\n---------------------\n\n```bash\ncomposer require phlak/colorizer\n```\n\nUsage\n-----\n\n```php\n// Import Colorizer\nuse PHLAK\\Colorizer;\n\n// Initialize Colorizer\n$colorize = new Colorizer\\Colorize();\n\n// Generate a Color object from 'foo'\n$color = $colorize-\u003etext('foo'); // Returns a new Color object\n\n// Get the red, green and blue values\n$color-\u003ered;    // 165\n$color-\u003egreen;  // 196\n$color-\u003eblue;   // 254\n\n// Generate a hex color code\n$color-\u003ehex();  // Returns '#a5c4fe'\n\n// Generate a RGB color code\n$color-\u003ergb();  // Returns 'rgb(165, 196, 254)'\n```\n\n#### Normalizing Colors\n\nYou can enforce RGB values to fall within a certain range to prevent colors\nfrom being too bright or dark.  This is possible by passing minimum and maximum\nnormalization values (0-255) to the Colorize class on initialization:\n\n```php\n$colorize = new Colorizer\\Colorize(64, 224);\n```\n\nor fluently:\n\n```php\n$colorize-\u003etext('foo')-\u003enormalize(64, 224)-\u003ergb();  // Returns 'rgb(165, 196, 224)'\n```\n\nChangelog\n---------\n\nA list of changes can be found on the [GitHub Releases](https://github.com/PHLAK/Colorizer/releases) page.\n\nTroubleshooting\n---------------\n\nFor general help and support join our [GitHub Discussion](https://github.com/PHLAK/Colorizer/discussions)\nor reach out on [Bluesky](https://bsky.app/profile/phlak.dev).\n\nPlease report bugs to the [GitHub Issue Tracker](https://github.com/PHLAK/Colorizer/issues).\n\nCopyright\n---------\n\nThis project is licensed under the [MIT License](https://github.com/PHLAK/Colorizer/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphlak%2Fcolorizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphlak%2Fcolorizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphlak%2Fcolorizer/lists"}