Skip to content

Instantly share code, notes, and snippets.

View padmalcom's full-sized avatar

padmalcom padmalcom

View GitHub Profile
@kakajika
kakajika / HSLColorUtil.java
Created July 18, 2016 10:40
Utility class for HSL color in Android.
import android.graphics.Color;
import android.support.annotation.ColorInt;
import android.support.annotation.NonNull;
import android.support.annotation.Size;
public class ColorUtil {
public static @ColorInt int lighten(@ColorInt int color, float value) {
float[] hsl = colorToHSL(color);
hsl[2] += value / 100;