全彩LED。全彩LED内置了红(Red)、绿(Green)和蓝(Blue)三种颜色的灯珠,根据三原色的原理,通过控制不同颜色灯珠的RGB值,调出多种颜色。
第1题:
A.黄、品红、青的含量
B.黄、红、蓝的含量
C.红、绿、蓝的含量
D.红、绿、青的含量
第2题:
阅读以下说明和 Java 代码,填补代码中的空缺,将解答填入答题纸的对应栏内。 【说明】 设计 RGB 方式表示颜色的调色板,进行绘图。其类图如图 6-1 所示。该程序的 Java代码附后。图6-1 类图
【Java 代码】 //颜色类 class MyColor { private int red ,green, blue; public MyColor( ) { red = o; green = 0; blue = 0; } public MyColor(int red ,int green ,int blue) { this.red = red; this.green = green; this.blue = blue; } //其他方法略 public String toString( ) { return "Red: " + red + "\tGreen: " + green + "\tBlue " + blue; } } //调色板类 class Palette { public int number; / /颜色数 private (1)palette; //颜色表 public Palette( ) { number = 256; palette = new MyColor[number); } public Palette(MyColor[] palette ,int number) { (2)= number; (3)= palette; } //其他方法略 public String toString( ) { String str = ""; for (int i = 0; i < number; i++) { str +=i+ " : " + palette[i] + "\n"; } return str; } //绘图类 class Drawing { public (4) int COLORNUMBER = 16; public static void main(String[] args) { Palette palette; int red ,green ,blue; MyColor[] color = new MyColor[COLORNUMBER]; for (int i = 0; i < COLORNUMBER; i++) { red = (int) (Math.random( ) * 256); green = (int) (Math.random( ) * 256); blue = (int) (Math.random( ) * 256); color [i] = (5) (red ,green ,blue); } palette = new Palette(color ,COLORNUMBER); System.out.println(palette); } }
第3题:
根据三原色说,人视网膜上具有三种不同状态的锥体细胞,它们对三种颜色最为敏感,因而称这三种颜色为“三原色”。“三原色”是【 】
A.红、黄、蓝
B.红、黄、绿
C.红、绿、蓝
D.黄、绿、蓝
第4题:
在RGB颜色模式中,RGB代表了()三个颜色。
第5题:
在CIE1931-RGB系统中,一个颜色的三刺激值,就代表了该颜色中()。
第6题:
阅读以下说明和Java代码,将应填入(n)处的语句写在对应栏内。
【说明】
本程序通过移动滑动条修改颜色RGB值,从而控制颜色。程序中有一个面板、3个标签和3个滑动条,标签和滑动条一一对应,分别对应三原色红、绿、蓝,任意拖动其中的一个滑动条,所对应的颜色值就会发生变化,面板的颜色也会发生对应的变化,如下图所示,滑动条值的范围是0~255。
【Java代码】
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class simple extends JFrame. implements AdjustmentListener{
public simple(){
setTitle("simple");
setSize(300, 200);
addWindowListener(new WindowAdapter(){
public void windowClosing((1)){
System.exit(0);
}
});
Container contentPane=getContentPane();
JPanel p=(2);
p.setLayout(new GridLayout(3, 2));
p.add(redLabel=new JLabel("Red 0"));
p.add(red=new JScrollBar(Adjustable. HORIZONTAL, 0, 0, 0, 255));
red.setBlocklncrement(16);
red.addAdjustmentListener(this);
p.add(greenLabel=(3) ("Green 0"));
p.add(green=new JScrollBar(Adjustable.HORIZONTAL 0, 0, 0, 255));
green setBIocklncrement(16);
green.addAdjustmentListener(this);
p.add(blueLabel=new JLabel("Blue 0"));
p.add(btue=new JScrollBar(Adjustable. HORIZONTAL, 0, 0, 0, 255));
blue,setBIocklncrement(16);
blue.addAdjustmentListener(this);
contentPane.add(p, "South");
colorPanet=new JPanel();
colorPanet.setBackground(new Color(0, 0, 0));
contentPane.add((4),"Center");
} public void adjustmentValueChanged(AdjustmentEvent evt){
redLabel.setText("Red"+red.getValue());
greenLabel.setText("Green"+green.getValue());
blueLabel.setText("Blue"+blue.getValue());
coiorPanel.setBackground(new Color(red.getValue(), green.getValue(), blue.getValue()));
colorPanel.repaint();
}
public static void main(String[] args){
JFrame. f=(5);
f.show();
}
private JLabel redLabel;
private JLabel greenLabel;
private JLabel blueLabel;
private JScrollBar red;
private JScroilBar green;
private JScrollBar blue;
private JPanel colorPanel;
第7题:
第8题:
A.黄、品红、蓝
B.黄、品红、青
C.黄、红、绿
D.红、绿、蓝
第9题:
RGB三原色的组成是哪三种颜色()
第10题:
被称为颜色的三原色的三种颜色分别是()