{"id":19274386,"url":"https://github.com/regexident/rainbows","last_synced_at":"2025-04-15T22:53:58.559Z","repository":{"id":71466286,"uuid":"95875754","full_name":"regexident/Rainbows","owner":"regexident","description":"A Metal-backed, blazingly fast alternative to CAGradientLayer.","archived":false,"fork":false,"pushed_at":"2024-08-10T22:38:20.000Z","size":4217,"stargazers_count":90,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T22:53:54.150Z","etag":null,"topics":["axial","calayer","gradient","ios","macos","radial","spiral","sweep"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/regexident.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":"2017-06-30T10:05:30.000Z","updated_at":"2025-03-29T23:10:29.000Z","dependencies_parsed_at":"2024-11-02T03:31:44.412Z","dependency_job_id":"05ee04e5-ec4a-40a9-a54d-bc0db4666bfd","html_url":"https://github.com/regexident/Rainbows","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regexident%2FRainbows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regexident%2FRainbows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regexident%2FRainbows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regexident%2FRainbows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/regexident","download_url":"https://codeload.github.com/regexident/Rainbows/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249167439,"owners_count":21223505,"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":["axial","calayer","gradient","ios","macos","radial","spiral","sweep"],"created_at":"2024-11-09T20:46:02.084Z","updated_at":"2025-04-15T22:53:58.530Z","avatar_url":"https://github.com/regexident.png","language":"Swift","readme":"![jumbotron](jumbotron.png)\n# Rainbows\n\n**Rainbows** is a **Metal-backed** alternative to `CAGradientLayer` that is **incredibly fast**. It provides drawing of **axial** (aka \"linear\"), **radial** (aka \"circular\"), **sweep** (aka \"angular\" aka \"conical\") and even trippy **spiral** gradients at **no less than 60fps**.\n\n![screencast](screencast.gif)\n\n## Usage\n\nLet's say you want to add a trippy noir spiral gradient to your view:\n\n```swift\nimport Rainbows\n\nlet gradientLayer = GradientLayer()\ngradientLayer.gradient = Gradient(colors: [\n    UIColor.black.cgColor, UIColor.white.cgColor\n])\ngradientLayer.configuration = .spiral(\n    center: CGPoint(x: 0.5, y: 0.5),\n    angle: 0.0 * CGFloat.pi * 2.0,\n    scale: 1.0\n)\ngradientLayer.frame = view.layer.bounds\nview.layer.addSublayer(gradientLayer)\n```\n\nOr just skip the detour via `self.layer` and use a convenient `GradientView`:\n\n```swift\nimport Rainbows\n\nlet gradientView = GradientView()\ngradientView.gradient = Gradient(colors: [\n    UIColor.black.cgColor, UIColor.white.cgColor\n])\ngradientView.configuration = .spiral(\n    center: CGPoint(x: 0.5, y: 0.5),\n    angle: 0.0 * CGFloat.pi * 2.0,\n    scale: 1.0\n)\n```\n\n## Installation\n\nThe recommended way to add **Rainbows** to your project is via [Carthage](https://github.com/Carthage/Carthage):\n\n    github 'regexident/Rainbows'\n\n## License\n\n**Rainbows** is available under the **MPL-2.0 license**. See the `LICENSE` file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fregexident%2Frainbows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fregexident%2Frainbows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fregexident%2Frainbows/lists"}