Holi is a lightweight Jetpack Compose library of colors, gradients and cool utility functions for all your palette needs!

Overview

Holi

A library of colors, gradients and utils built using Jetpack Compose for Android

License MIT Maven Central

Features

  • A wide collection of colors from different palettes for easy access in your pet projects
  • Provides easy gradient building functions that all your composable brushes need
  • Just 28 KB in size! Over 450 predefined colors and endless gradients.

Color Palettes

  • Material Colors
  • Flat Colors
  • Cool Colors
  • Dracula Colors

Color palette showcase

Cool Colors Material colors Flat colors Dracula colors

Gradient mixer showcase

Directional Gradients Directional multi color gradients

Using colors

You can simply pick colors by using the container objects for each palette and profit.

Eg.

   MaterialColor.RED
   CoolColor.FIREBRICK
   FlatColor.EMERLAND
   DraculaColor.YELLOW

Palette references

Using Gradients

Using gradients is super easy with Holi, just use GradientMixer and choose from various gradient brush generating functions.

1. Mixing two colors

   GradientMixer.bottomLeftToTopRight(MaterialColor.RED,MaterialColor.GREEN)

2. Mixing more than two colors

   GradientMixer.topRightToBottomLeft(
    listOf(MaterialColor.RED,
    MaterialColor.GREEN,
    MaterialColor.PURPLE)
    )

3. Reversing gradients

   GradientMixer.rightToLeft(FlatColor.CARROT,FlatColor.POMEGRANATE,reversed = true)

Holi'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. The idea behind this gradient mixer is easy access to gradient building.

How to use

Holi is available on MavenCentral, declare maven central in your repositories and implement the latest version in dependencies.

Step 1. Add to repositories

allprojects {
    repositories {
        mavenCentral()
    }
}

Step 2. Add in dependencies

dependencies {

    implementation 'com.siddroid:holi:0.0.7'
    
}

Licensing

  MIT License
 
  Copyright (c) 2021 Siddhesh Patil, Siddroid.com
 
  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, andor sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:
 
  The above copyright notice and this permission notice shall be included in all
  copies or substantial portions of the Software.
 
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
 

Disclaimer

Holi 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.

You might also like...
Utility for monitoring Genshin Impact in-game status, built with Jetpack Compose, Accompanist, and more
Utility for monitoring Genshin Impact in-game status, built with Jetpack Compose, Accompanist, and more

yumetsuki An utility app for monitoring in-game status on Genshin Impact like resin status, realm currency, expedition, daily commission status, etc.

Android.compose.squircle - Android LightWeight Squircle Library for JetPack Compose

Android LightWeight Squircle Library for JetPack Compose Usage Based on Compose

Lightweight library to tweak the fling behaviour in Android. This library is only compatible with Jetpack-Compose.
Lightweight library to tweak the fling behaviour in Android. This library is only compatible with Jetpack-Compose.

Flinger (Only compatible with compose) What is Flinger? Flinger is a plugin that is made on top of jetpack compose that will help the developer to twe

A Collection on all Jetpack compose UI elements, Layouts, Widgets and Demo screens to see it's potential
A Collection on all Jetpack compose UI elements, Layouts, Widgets and Demo screens to see it's potential

ComposeCookBook Declarative UI A Collection of all Jetpack compose UI elements, Layouts, Widgets and Demo screens to see it's potential. Jetpack Compo

A LibrePhotos android client written using Jetpack Compose and all the latest Android technologies
A LibrePhotos android client written using Jetpack Compose and all the latest Android technologies

UhuruPhotos. A LibrePhotos client UhuruPhotos is an Android client for LibrePhotos written using the latest Android technologies, like Jetpack Compose

A playground to showcase cool IDE features.

Let the IDE do that for you It's not being lazy if it makes you more productive ๐Ÿ—ฃ๏ธ Sebastiano Poggi Lead on Package Search at JetBrains Android, Flut

A lightweight particle system for Jetpack Compose - Quarks
A lightweight particle system for Jetpack Compose - Quarks

compose-particle-system Quarks is a lightweight particle system for Jetpack Compose. There are endless possibilities for creating generative art with

Icontent - Jetpack Compose component to show all random content sended by Inmersoft guide backend

icontent IContent is a library that allows loading audio visual content generica

Notes is a simple and private notes app. Organize your thoughts, discoveries, and ideas and simplify planning important moments in your life with your digital notepad.
Notes is a simple and private notes app. Organize your thoughts, discoveries, and ideas and simplify planning important moments in your life with your digital notepad.

Notes Example Download Download the latest version of the Android app from this link. Building Using Android Studio Clone the repo, open it in Android

Comments
  • Update version to 1.0.1

    Update version to 1.0.1

    Purpose

    • This PR migrates artifactory publishing script to publish plugin
    • Major update for dependency versions to stable releases
    • Upgrade Kotlin and AGP versions
    • New release version 1.0.1
    • Local composition for colors by @ch8n
    opened by PatilSiddhesh 0
  • Migrate to nexus maven publish plugin

    Migrate to nexus maven publish plugin

    Purpose

    • This PR migrates artifactory publishing script to publish plugin
    • Major update for dependency versions to stable releases
    • Upgrade Kotlin and AGP versions

    Preview

    • No visual changes
    opened by PatilSiddhesh 0
  • Added Local Composition to provide color through material theme

    Added Local Composition to provide color through material theme

    What is Local Composition? Docs - https://developer.android.com/jetpack/compose/compositionlocal.

    What is PR Does? Add Holi colors to be available on the Material Theme object.

    Text(
        text = "Holi Local Composition!",
        color = MaterialTheme.flatColors.CLOUDS
    )
    
    opened by ch8n 0
Owner
Siddhesh Patil
Android Engineer @paytm @only-much-louder. Organizer of @KotlinMumbai
Siddhesh Patil
๐Ÿš€๐Ÿž๐Ÿ’ช Collection of Images, Modifiers, utility functions for Jetpack Compose to expand and enrich displaying, manipulating, scaling, resizing, zooming, and getting cropped ImageBitmap based on selection area

Collection of Images, Modifiers, utility functions for Jetpack Compose to expand and enrich displaying, manipulating, scaling, resizing, zooming, and getting cropped ImageBitmap based on selection area, before/after image to with handle to show partial of both images and more is cooking up

Smart Tool Factory 207 Dec 26, 2022
A lightweight library for using Material Colors in Android Jetpack Compose Project ๐Ÿš€๐Ÿš€๐Ÿš€

How To Use Step 1: Add the JitPack repository to your build file. Add it in your root build.gradle / build.gradle.kts at the end of repositories: Groo

Atick Faisal 9 Sep 9, 2022
๐ŸŒˆ Palette - A color picker library made in Jetpack Compose

?? Palette A color picker library made in Jetpack Compose. Including in your project Gradle Add it in your root build.gradle at the end of repositorie

Shivam Dhuria 56 Dec 11, 2022
Jetpack-compose-animations-examples - Cool animations implemented with Jetpack compose

Jetpack-compose-animations-examples This repository consists of 4 animations: St

Canopas Software 180 Jan 2, 2023
Capturable - ๐Ÿš€Jetpack Compose utility library for capturing Composable content and transforming it into Bitmap Image๐Ÿ–ผ๏ธ

Capturable ?? A Jetpack Compose utility library for converting Composable content into Bitmap image ??๏ธ . Made with โค๏ธ for Android Developers and Comp

Shreyas Patil 494 Dec 29, 2022
Flippable - A Jetpack Compose utility library to create flipping Composable views with 2 sides

?? Flippable A Jetpack Compose utility library to create flipping Composable views with 2 sides. Built with โค๏ธŽ by Wajahat Karim and contributors Demo

Wajahat Karim 298 Dec 23, 2022
This repo is to demonstrate the jetpack compose 's canvas api's usage and creating an icon pack using the basic functions.

Jetpack Compose Canvas API Demo App We all know that Jetpack Compose has now reached the 1.0.0 release milestone. This is a huge change we can say for

vikas kumar 32 Dec 15, 2022
Mocking with Jetpack Compose - stubbing and verification of Composable functions

Mockposable A companion to mocking libraries that enables stubbing and verification of functions annotated with @androidx.compose.runtime.Composable.

Jesper ร…man 21 Nov 15, 2022
A CLI utility to convert Jetpack Compose compiler metrics and reports to beautified ๐Ÿ˜ HTML page

Compose Compiler Reports to HTML Generator A CLI utility to convert Jetpack Compose compiler metrics and reports to beautified ?? HTML page. Made with

Shreyas Patil 145 Jan 3, 2023