答案 0 :(得分:0)
我找到this library并且它有效。我们可以通过以下方式获取RGB值。
picker.setOnColorChangedListener(new ColorPicker.OnColorChangedListener() {
@Override
public void onColorChanged(int color) {
String hexColor = String.format("#%06X", (0xFFFFFF & color));
int red = Color.red(color);
int green = Color.green(color);
int blue = Color.blue(color);
Log.d("Color2", "" + hexColor+" ,"+"R:"+red+" ,"+"G:"+green+" ,"+"B:"+blue+" ,");
}
});