get Red from color - Android Graphics

Android examples for Graphics:Color RGB Value

Description

get Red from color

Demo Code


//package com.java2s;

public class Main {

    public static int getRed(int color) {
        int red = (color & 0xff0000) >> 16;
        return red;
    }//from  ww w .  j a  v a  2 s  .c o  m
}

Related Tutorials