Android Color Darker getDarker(int colour)

Here you can find the source of getDarker(int colour)

Description

get Darker

License

Open Source License

Declaration

public static int getDarker(int colour) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import android.graphics.Color;

public class Main {
    public static int getDarker(int colour) {
        float[] hsv = new float[3];
        Color.colorToHSV(colour, hsv);
        hsv[2] *= 0.5f; // value component

        return Color.HSVToColor(hsv);
    }/*  ww  w. j a va  2 s  .c om*/
}

Related

  1. isColorDark(final int color)