Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

import android.graphics.Color;
import android.graphics.Paint;

public class Main {
    public static String toRGB(int color) {
        return "[" + Color.red(color) + " | " + Color.green(color) + " | " + Color.blue(color) + "]";
    }

    public static String toRGB(Paint paint) {
        if (paint == null)
            return "null";
        return toRGB(paint.getColor());
    }
}