public DetectLabelsImageForeground withDominantColors(DominantColor... dominantColors) {
        if (this.dominantColors == null) {
            setDominantColors(new java.util.ArrayList<DominantColor>(dominantColors.length));
        }
        for (DominantColor ele : dominantColors) {
            this.dominantColors.add(ele);
        }
        return this;
    }
<p>
The dominant colors found in the foreground of an image, defined with RGB values, CSS color name, simplified
color name, and PixelPercentage (the percentage of image pixels that have a particular color).
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setDominantColors(java.util.Collection)} or {@link #withDominantColors(java.util.Collection)} if you want
to override the existing values.
</p>

@param dominantColors
       The dominant colors found in the foreground of an image, defined with RGB values, CSS color name,
       simplified color name, and PixelPercentage (the percentage of image pixels that have a particular color).
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/DetectLabelsImageForeground.java