每个分量255,但是文档说
干脆直接计算分量占255百分比
//设置背景蓝透明(98, 208, 244, 0.1f) textArea.setBackground(new Color(0.384f, 0.815f, 0.956f, 0.1f));
public Color(float r,float g,float b,float a)方法报IllegalArgumentException
原文:https://www.cnblogs.com/gulu-miao/p/12907752.html