paint.setColor比实际值更暗

时间:2016-07-13 04:54:43

标签: android android-custom-view android-drawable android-color

我使用下面的 Paint 对象使用颜色代码"#D63333""#009933"绘制圆形边框。我注意到创建的边框比我应用相同颜色代码的其他图像更暗。油漆有一个默认的黑色,我猜它们会成倍增加?

如何保持颜色的纯度。

    Paint borderPaint = new Paint();
    borderPaint.setStyle(Paint.Style.STROKE);
    borderPaint.setStrokeWidth(5);
    borderPaint.setColor(Color.TRANSPARENT);
    borderPaint.setColor(Color.parseColor(color));

Image1 with green color Image 2 with Red color

0 个答案:

没有答案