我使用下面的代码来随机的改变textview的颜色。背景色是黑的,所以有时候有的颜色很难辨认。
int r = (rand.nextInt(176) * 80 ) / 256;
int g = (rand.nextInt(176) * 80 ) / 256;
int b = (rand.nextInt(176) * 80 ) / 256;
TextView pos = (TextView) view.findViewById(R.id.position);
pos.setText(((Integer)(position + 1)).toString());
pos.setTextSize(30);
pos.setTextColor(Color.argb(255,r,g,b));
TextView data = (TextView) view.findViewById(R.id.textOfTip);
data.setText(tipsList[position].toString());
data.setTextSize(24);
data.setTextColor(Color.argb(255,r,g,b));
请问如何增强 text 颜色的亮度,以便容易辨认呢?
亮度最高的颜色是白色和黄色..
一般你弄字体亮度没用..你不如设置背景色...弄成黑白色的...让文字劲量不要黑