How to convert an image color to another color in android
<pre><code>private Bitmap convertColorIntoBlackAndWhiteImage(Bitmap orginalBitmap) {
    ColorMatrix colorMatrix = new ColorMatrix();
    colorMatrix.setSaturation(0);

    ColorMatrixColorFilter colorMatrixFilter = new ColorMatrixColorFilter(
            colorMatrix);

    Bitmap blackAndWhiteBitmap = orginalBitmap.copy(
            Bitmap.Config.ARGB_8888, true);

    Paint paint = new Paint();
    paint.setColorFilter(colorMatrixFilter);

    Canvas canvas = new Canvas(blackAndWhiteBitmap);
    canvas.drawBitmap(blackAndWhiteBitmap, 0, 0, paint);

    return blackAndWhiteBitmap;
}
</code></pre>

<p>I used the above code to convert my color image into Black/white image.</p>

<p>As we observe in some of the phones,that there is another option which changes the image to some mixed color image.</p>

<p>How can I modify my code to get that mixed colored image?</p>

<p>I think there is need to change in this line of code</p>

<pre><code> Bitmap blackAndWhiteBitmap = orginalBitmap.copy(Bitmap.Config.ARGB_8888, true);
</code></pre>

<p>please help with suggestions </p>

<p>Thanks in advance</p>
