void (final Color c) { final float[] hbs = Color.RGBtoHSB(c.getRed(), c.getGreen(), c.getBlue(), null); myRed.setText(String.valueOf(((int)(360f * hbs[0])))); myGreen.setText(String.valueOf(((int)(100f * hbs[1])))); myBlue.setText(String.valueOf(((int)(100f * hbs[2])))); }