public Color toGrayscale() {
        float v = (this.rgba[0] + this.rgba[1] + this.rgba[2]) / 3f;
        return new Color(v, v, v, this.rgba[3]);
    }
Helper class for working with colors and gradients

@author Anthyon
jme3-terrain/src/main/java/com/jme3/terrain/noise/Color.java