private ColorRGBA convertColor(Color inColor, ColorRGBA outColor) {
        float red = inColor.getRed();
        float green = inColor.getGreen();
        float blue = inColor.getBlue();
        float alpha = inColor.getAlpha();

        if (colorSpace == ColorSpace.sRGB) {
            outColor.setAsSrgb(red, green, blue, alpha);
        } else {
            outColor.set(red, green, blue, alpha);
        }

        return outColor;
    }
Instantiates a new RenderDevice using the specified ColorSpace for Nifty
colors.

@param display the SceneProcessor to render Nifty (not null, alias created)
@param colorSpace the ColorSpace to use for Nifty colors (sRGB or Linear)
jme3-niftygui/src/main/java/com/jme3/niftygui/RenderDeviceJme.java