Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.graphics.Color;

public class Main {
    public static int rgb(int r, int g, int b) {
        return Color.rgb(r, g, b);
        /* volume color
        if (r == 0 && g == 0 && b == 0)
           return Color.BLACK;
        float mult = 1 + (amplitude / 10000f);
        int newR = Math.min(255, (int)Math.round(r * mult));
        int newG = Math.min(255, (int)Math.round(g * mult));
        int newB = Math.min(255, (int)Math.round(b * mult));
        return Color.rgb(newR, newG, newB);
         */
    }
}