Java examples for 2D Graphics:Color RGB
Returns rgba() string from SAC rgb LexicalUnit value
//package com.java2s; public class Main { /**/* w w w . j a va 2 s .c o m*/ * Returns rgba() string from SAC rgb LexicalUnit value * @param colors * @return */ public static String RGBAfromRGB(int r, int g, int b) { return String.format("rgba(%s, %s, %s, %s)", r, g, b, 1F); } }