you could correct that using : "#"+String.format("%08X", color) instead of : "#"+Integer.toHexString(color)