Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用Color.colorToHSV此代码的功能:
Color.colorToHSV
float[] hsv = new float[3]; android.graphics.Color.colorToHSV(color, hsv);
但是 hsv 数组中的结果总是{0.0, 0.0, 0.0},什么磨损了?这是一个错误?
{0.0, 0.0, 0.0}
显然,在编辑模式下使用 colorToHSV (View.isInEditMode()) 时,该函数返回零。当它在设备上运行时,它可以工作......