Q:

How do I get a seek bar to progress with hex

I am trying to get this seekbar to change the contrast of a black and white picture, the problem is I am required to use this specific library, I must insert the segment of code that is supposed to effect the contrast. It takes a hex(kinda lol)
static int Lower1 = 0xFFEEEEEE; //very close to White 
    static int Lower2 = 0xFFDDDDDD;

    static int Color1 = Color.WHITE;    //0xFFFFFFFF
    static int Color2 = Color.DKGRAY;
    static int Color3 = Color.BLACK;    //0xFF000000

    public static void sharpen(Bitmap source ) {
        sharpen(source, Lower1, Lower2, Color1, Color2, Color3 );
    }
    public static void sharpen(Bitmap source, int lower1 ) {
        sharpen(source, lower1, Lower2, Color1, Color2, Color3 );
    }
    public static void sharpen(Bitmap source, int lower1, int lower2, int color1, int color2, int color3 ) {
        int w = source.getWidth();
        int h = source.getHeight();

        //loop through pixels and make a hard determination
        //if white leave it, otherwise turn it black
        for (int x = 0; x < w; x++) {
          for (int y = 0; y < h; y++) {           
            int color = source.getPixel(x, y);
            if (color >= lower1)
                source.setPixel(x, y, color1);  
            else if (color >= lower2)
                source.setPixel(x, y, color2);
            else
                source.setPixel(x, y,color3);   
          }
        }
    }

here is what I'm using for the seekbar:
seek.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {

            @Override
            public void onStopTrackingTouch(SeekBar seekBar) {
                // TODO Auto-generated method stub

            }

            @Override
            public void onStartTrackingTouch(SeekBar seekBar) {
                // TODO Auto-generated method stub

            }

            @Override
            public void onProgressChanged(SeekBar seekBar, int progress,
                    boolean fromUser) {
                sharp = back;
                ManipBitmap.sharpen(sharp,progress);
                image.setImageBitmap(sharp);

            }
        });

I'm trying to update the background as you move the slider, which is the black and the white images
thanks!

A:

Set your SeekBar value range from 0 (0x00) to 255 (0xFF), then change the code to:
@Override
public void onProgressChanged(SeekBar seekBar, int progress,
        boolean fromUser) {
    int lower = Color.argb(0xFF, progress, progress, progress);
    sharp = Bitmap.createBitmap(back); // create a copy

    ManipBitmap.sharpen(sharp,lower);
    image.setImageBitmap(sharp);
}

Color.argb(alpha, red, green, blue) will return corresponding color code in ARGB. Also, since your process is destructive (overwriting same image), you need to create a copy and do the manipulation on it instead.

