{"id":13520415,"url":"https://github.com/regexident/Rainbows","last_synced_at":"2025-03-31T16:31:25.823Z","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":4211,"stargazers_count":87,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-10T23:36:10.722Z","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":"2024-08-10T22:38:15.000Z","dependencies_parsed_at":"2023-04-19T16:47:36.729Z","dependency_job_id":null,"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":222670691,"owners_count":17020513,"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-08-01T05:02:20.017Z","updated_at":"2024-11-02T03:31:31.152Z","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":["Swift"],"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"}