# Function: rgb2javacolor

## CALL:

color = rgb2javacolor(rgb)

## DESCRIPTION:

Convert Matlab rgb triple to a java color.

## INPUT:

rgb | any |
    array [red green blue] values (between 0 and 1) or
    array [red green blue alpha] values (between 0 and 1) or
    char with Matlab color code ('k','w','r','g','b','y','m','c')
    char with CSS color e.g. '#00FF00' for green, '#0000FF' for blue, note
    that the string should start with a #RRGGBB and the hexadecimal value
    for red, green and blue. Alpha cannot be specified with this option

## OUTPUT:

color | java.awt.Color |

## APPROACH:

       4th element in the rgb array with alpha is optional