Here you can find the source of RGBToColor(final float pRed, final float pGreen, final float pBlue)
public static int RGBToColor(final float pRed, final float pGreen, final float pBlue)
//package com.java2s; import android.graphics.Color; public class Main { private static final int COLOR_FLOAT_TO_INT_FACTOR = 255; public static int RGBToColor(final float pRed, final float pGreen, final float pBlue) { return Color.rgb((int) (pRed * COLOR_FLOAT_TO_INT_FACTOR), (int) (pGreen * COLOR_FLOAT_TO_INT_FACTOR), (int) (pBlue * COLOR_FLOAT_TO_INT_FACTOR)); }// w ww .j av a2 s .c om }