{"id":906,"url":"https://github.com/PerfectFreeze/PFColorHash","last_synced_at":"2025-07-30T19:33:05.093Z","repository":{"id":36794424,"uuid":"41101226","full_name":"PerfectFreeze/PFColorHash","owner":"PerfectFreeze","description":"Generate color based on the given string.","archived":false,"fork":false,"pushed_at":"2023-02-26T16:08:56.000Z","size":368,"stargazers_count":27,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-01T23:21:11.863Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","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/PerfectFreeze.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}},"created_at":"2015-08-20T14:45:36.000Z","updated_at":"2023-08-20T12:51:36.000Z","dependencies_parsed_at":"2022-08-29T04:01:11.442Z","dependency_job_id":"1a18f677-06cc-47a1-9d01-a3796dc4af35","html_url":"https://github.com/PerfectFreeze/PFColorHash","commit_stats":{"total_commits":23,"total_committers":5,"mean_commits":4.6,"dds":0.4347826086956522,"last_synced_commit":"3d177d2f2c2b998fcde64c889d804e93a094e95d"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerfectFreeze%2FPFColorHash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerfectFreeze%2FPFColorHash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerfectFreeze%2FPFColorHash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerfectFreeze%2FPFColorHash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PerfectFreeze","download_url":"https://codeload.github.com/PerfectFreeze/PFColorHash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228179038,"owners_count":17881127,"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-01-05T20:15:34.353Z","updated_at":"2024-12-04T19:32:26.224Z","avatar_url":"https://github.com/PerfectFreeze.png","language":"Swift","funding_links":[],"categories":["Color"],"sub_categories":["Linter","Other free courses"],"readme":"# PFColorHash\n\n[![Cocoapods](https://cocoapod-badges.herokuapp.com/v/PFColorHash/badge.png)](http://cocoapods.org/?q=PFColorHash)\n\n**Swift 4.0 SUPPORT!**\n\nGenerate color based on the given string. Thanks to [color-hash](https://github.com/zenozeng/color-hash).\n\n![Sample](Sample.gif)\n\n## Usage\n\n### Basic\n\n```Swift\nlet colorHash = PFColorHash()\n\n// in HSL, Hue ∈ [0, 360), Saturation ∈ [0, 1], Lightness ∈ [0, 1]\ncolorHash.hsl('Hello World') // [ 225, 0.65, 0.35 ]\n\n// in RGB, R, G, B ∈ [0, 255]\ncolorHash.rgb('Hello World') // [ 134, 150, 196 ]\n\n// in HEX\ncolorHash.hex('Hello World') // '#8696c4'\n```\n\n### Custom Hash Function / Lightness / Saturation\n\n```Swift\nlet colorHash = PFColorHash(hash: { (str: String) -\u003e Int64 in\n\tvar hashValue: Int64 = 0\n\t// Your Hash Function Here\n\treturn hashValue\n})\n```\n\n```Swift\nlet colorHash = PFColorHash(lightness: [0.35, 0.5, 0.65])\n```\n\n```Swift\nlet colorHash = PFColorHash(saturation: [0.35, 0.5, 0.65])\n```\n\n```Swift\nlet colorHash = PFColorHash(lightness: [0.35, 0.5, 0.65], saturation: [0.35, 0.5, 0.65])\n```\n\n## License\n\nReleased under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPerfectFreeze%2FPFColorHash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPerfectFreeze%2FPFColorHash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPerfectFreeze%2FPFColorHash/lists"}