Gets rgba() string from SAC rgba LexicalUnit value - Java 2D Graphics

Java examples for 2D Graphics:Color RGB

Description

Gets rgba() string from SAC rgba LexicalUnit value

Demo Code


//package com.java2s;

public class Main {
    /**/*from   www  .  ja  v  a 2s.  c  om*/
     * Gets rgba() string from SAC rgba LexicalUnit value
     * @param colors
     * @return
     */
    public static String RGBA(int r, int g, int b, float a) {
        return String.format("rgba(%s, %s, %s, %s)", r, g, b, a);
    }
}

Related Tutorials