private Color mutateColour(Color colour, Random rng)
    {
        if (mutationProbability.nextValue().nextEvent(rng))
        {
            return new Color(mutateColourComponent(colour.getRed()),
                             mutateColourComponent(colour.getGreen()),
                             mutateColourComponent(colour.getBlue()),
                             mutateColourComponent(colour.getAlpha()));
        }
        else
        {
            return colour;
        }
    }
private Color mutateColour ( Color colour , Random rng ) { if ( mutationProbability . nextValue ( ) . nextEvent ( rng ) ) { return new Color ( mutateColourComponent ( colour . getRed ( ) ) , mutateColourComponent ( colour . getGreen ( ) ) , mutateColourComponent ( colour . getBlue ( ) ) , mutateColourComponent ( colour . getAlpha ( ) ) ) ; } else { return colour ; } }
Mutate the specified colour.
@param colour The colour to mutate.
@param rng A source of randomness.
@return The (possibly) mutated colour.