{"id":13668614,"url":"https://github.com/PatilSiddhesh/Holi","last_synced_at":"2025-04-27T01:31:37.543Z","repository":{"id":45033847,"uuid":"352126116","full_name":"PatilSiddhesh/Holi","owner":"PatilSiddhesh","description":"Holi is a lightweight Jetpack Compose library of colors, gradients and cool utility functions for all your palette needs!","archived":false,"fork":false,"pushed_at":"2022-07-16T11:42:55.000Z","size":7423,"stargazers_count":167,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-11T05:38:09.312Z","etag":null,"topics":["android","colors","declarative-ui","jetpack","jetpack-compose","library","theming"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/PatilSiddhesh.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":"2021-03-27T16:49:17.000Z","updated_at":"2024-06-27T13:01:06.000Z","dependencies_parsed_at":"2022-08-31T04:42:16.413Z","dependency_job_id":null,"html_url":"https://github.com/PatilSiddhesh/Holi","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatilSiddhesh%2FHoli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatilSiddhesh%2FHoli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatilSiddhesh%2FHoli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatilSiddhesh%2FHoli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PatilSiddhesh","download_url":"https://codeload.github.com/PatilSiddhesh/Holi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251076992,"owners_count":21532606,"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":["android","colors","declarative-ui","jetpack","jetpack-compose","library","theming"],"created_at":"2024-08-02T08:00:43.505Z","updated_at":"2025-04-27T01:31:32.527Z","avatar_url":"https://github.com/PatilSiddhesh.png","language":"Kotlin","funding_links":[],"categories":["Miscellaneous"],"sub_categories":[],"readme":"# Holi\n### A library of colors, gradients and utils built using Jetpack Compose for Android\n\n[![License MIT](https://img.shields.io/badge/Licence-MIT-blue.svg)](https://raw.githubusercontent.com/patilsiddhesh/Holi/main/LICENSE)\n![Maven Central](https://img.shields.io/maven-central/v/com.siddroid/holi?label=Maven%20Central\u0026style=flat-square)\n\n### Features\n\n* A wide collection of colors from different palettes for easy access in your pet projects\n* Provides easy gradient building functions that all your composable brushes need\n* Just 28 KB in size! Over 450 predefined colors and endless gradients.\n\n### Color Palettes\n\n* Material Colors\n* Flat Colors\n* Cool Colors\n* Dracula Colors\n\n## Color palette showcase\n\n|                           Cool Colors                           |                         Material colors                         |                           Flat colors                           |                         Dracula colors                          |\n| :-------------------------------------------------------------: | :-------------------------------------------------------------: | :-------------------------------------------------------------: | :-------------------------------------------------------------: |\n| ![](https://media.giphy.com/media/S4uHXw9SoQaEl14b3c/giphy.gif) | ![](https://media.giphy.com/media/otyj84B8RncGPo6rxC/giphy.gif) | ![](https://media.giphy.com/media/NLnvrD57u5iJ2IbQGO/giphy.gif) | ![](https://media.giphy.com/media/CGbaGmKoym3rqsf7XQ/giphy.gif) |\n\n### Gradient mixer showcase\n\n|                      Directional Gradients                      |                Directional multi color gradients                |\n| :-------------------------------------------------------------: | :-------------------------------------------------------------: |\n| ![](https://media.giphy.com/media/d2ZAyZDFgFm5ZPX8v4/giphy.gif) | ![](https://media.giphy.com/media/80odY16jAXAuUCDyds/giphy.gif) |\n\n### Using colors\n\nYou can simply pick colors by using the container objects for each palette and profit.\n\nEg.\n```kotlin\n   MaterialColor.RED\n   CoolColor.FIREBRICK\n   FlatColor.EMERLAND\n   DraculaColor.YELLOW\n```\n\n![](https://media.giphy.com/media/CTRkESw2qqbuBLgR86/giphy.gif)\n\n### Palette references\n\n* [Material Colors](https://www.materialui.co/colors)\n* [Flat Colors](https://www.materialui.co/flatuicolors)\n* [Cool Colors](https://www.materialui.co/htmlcolors)\n* [Dracula Colors](https://draculatheme.com/contribute/)\n\n\n### Using Gradients\n\nUsing gradients is super easy with Holi, just use GradientMixer and choose from various gradient brush generating functions.\n\n#### 1. Mixing two colors\n```kotlin\n   GradientMixer.bottomLeftToTopRight(MaterialColor.RED,MaterialColor.GREEN)\n```\n\n#### 2. Mixing more than two colors\n```kotlin\n   GradientMixer.topRightToBottomLeft(\n    listOf(MaterialColor.RED,\n    MaterialColor.GREEN,\n    MaterialColor.PURPLE)\n    )\n```\n\n#### 3. Reversing gradients\n```kotlin\n   GradientMixer.rightToLeft(FlatColor.CARROT,FlatColor.POMEGRANATE,reversed = true)\n```\n\n![](https://media.giphy.com/media/W5pC7NKZVsKcu7bEh8/giphy.gif)\n\nHoli's GradientMixer is a container for gradient (Compose Brush) generating functions. These functions act as wrappers around Compose's gradient generators so that you don't have to figure out offset values with their directions.\nThe idea behind this gradient mixer is easy access to gradient building.\n\n## How to use\n\nHoli is available on MavenCentral, declare maven central in your repositories and implement the latest version in dependencies.\n\n#### Step 1. Add to repositories\n\n```groovy\n\nallprojects {\n    repositories {\n        mavenCentral()\n    }\n}\n\n```\n\n\n#### Step 2. Add in dependencies\n\n```groovy\n\ndependencies {\n\n    implementation 'com.siddroid:holi:1.0.1'\n\n}\n\n```\n\n#### Step 3. (Optional) Setting up with local composition\n\nWrap your Material theme composable with `HoliPaletteComposition` to use colors through MaterialTheme object\n\nEg.\n```kotlin\n@Composable\nfun HoliTheme(...) {\n    ...\n\n    HoliPaletteComposition {\n        MaterialTheme(\n            colors = colors,\n            content = content\n        )\n    }\n\n}\n\n```\nAfter this you can safely use\n\n```kotlin\nText(\n    text = \"Holi Local Composition!\",\n    color = MaterialTheme.flatColors.CLOUDS\n)\n```\n\n## Licensing\n\n```\n  MIT License\n\n  Copyright (c) 2022 Siddhesh Patil, Siddroid.com\n\n  Permission is hereby granted, free of charge, to any person obtaining a copy\n  of this software and associated documentation files (the \"Software\"), to deal\n  in the Software without restriction, including without limitation the rights\n  to use, copy, modify, merge, publish, distribute, sublicense, andor sell\n  copies of the Software, and to permit persons to whom the Software is\n  furnished to do so, subject to the following conditions:\n\n  The above copyright notice and this permission notice shall be included in all\n  copies or substantial portions of the Software.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n  SOFTWARE.\n\n```\n\n## Disclaimer\n\nHoli uses color palettes from the reference sites, these colors / swatches are free to use. A big thanks to the maintainers for making these color palettes.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPatilSiddhesh%2FHoli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPatilSiddhesh%2FHoli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPatilSiddhesh%2FHoli/lists"}