@Override public void onValueChanged(BgSeekBar seekBar, int value, boolean fromUser, boolean usingKeys) { if (ignoreChanges) return; hsv.h = barH.getValue() / 360.0; hsv.s = barS.getValue() / 100.0; hsv.v = barV.getValue() / 100.0; currentColor = hsv.toRGB(false); if (seekBar == barH) { updateGS(); updateGV(); } else if (seekBar == barS) { updateGH(); updateGV(); } else if (seekBar == barV) { updateGH(); updateGS(); } ignoreChanges = true; txtH.setText(Integer.toString((int) (hsv.h * 360.0))); txtS.setText(Integer.toString((int) (hsv.s * 100.0))); txtV.setText(Integer.toString((int) (hsv.v * 100.0))); txt.setText(ColorUtils.toHexColor(currentColor)); ignoreChanges = false; barH.invalidate(); barS.invalidate(); barV.invalidate(); bgCurrent.setColor(currentColor); lblCurrent.invalidate(); }