2016-12-30 22:22:39 -08:00
|
|
|
// collectiontopics/HTMLColorTest.java
|
2020-10-07 13:35:40 -06:00
|
|
|
// (c)2020 MindView LLC: see Copyright.txt
|
2016-11-01 11:43:22 -07:00
|
|
|
// We make no guarantees that this code is fit for any purpose.
|
|
|
|
// Visit http://OnJava8.com for more book information.
|
|
|
|
import static onjava.HTMLColors.*;
|
|
|
|
|
|
|
|
public class HTMLColorTest {
|
2016-11-21 12:37:57 -08:00
|
|
|
static final int DISPLAY_SIZE = 20;
|
2016-11-01 11:43:22 -07:00
|
|
|
public static void main(String[] args) {
|
2016-11-21 12:37:57 -08:00
|
|
|
show(MAP, DISPLAY_SIZE);
|
2016-11-01 11:43:22 -07:00
|
|
|
border();
|
2016-11-21 12:37:57 -08:00
|
|
|
showInv(INVMAP, DISPLAY_SIZE);
|
2016-11-01 11:43:22 -07:00
|
|
|
border();
|
2016-11-21 12:37:57 -08:00
|
|
|
show(LIST, DISPLAY_SIZE);
|
2016-11-01 11:43:22 -07:00
|
|
|
border();
|
2016-11-21 12:37:57 -08:00
|
|
|
showrgb(RGBLIST, DISPLAY_SIZE);
|
2016-11-01 11:43:22 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
/* Output:
|
|
|
|
0xF0F8FF: AliceBlue
|
|
|
|
0xFAEBD7: AntiqueWhite
|
|
|
|
0x7FFFD4: Aquamarine
|
|
|
|
0xF0FFFF: Azure
|
|
|
|
0xF5F5DC: Beige
|
|
|
|
0xFFE4C4: Bisque
|
|
|
|
0x000000: Black
|
|
|
|
0xFFEBCD: BlanchedAlmond
|
|
|
|
0x0000FF: Blue
|
|
|
|
0x8A2BE2: BlueViolet
|
|
|
|
0xA52A2A: Brown
|
|
|
|
0xDEB887: BurlyWood
|
|
|
|
0x5F9EA0: CadetBlue
|
|
|
|
0x7FFF00: Chartreuse
|
|
|
|
0xD2691E: Chocolate
|
|
|
|
0xFF7F50: Coral
|
|
|
|
0x6495ED: CornflowerBlue
|
|
|
|
0xFFF8DC: Cornsilk
|
|
|
|
0xDC143C: Crimson
|
|
|
|
0x00FFFF: Cyan
|
2017-04-16 10:18:21 -07:00
|
|
|
******************************
|
2016-11-01 11:43:22 -07:00
|
|
|
AliceBlue 0xF0F8FF
|
|
|
|
AntiqueWhite 0xFAEBD7
|
|
|
|
Aquamarine 0x7FFFD4
|
|
|
|
Azure 0xF0FFFF
|
|
|
|
Beige 0xF5F5DC
|
|
|
|
Bisque 0xFFE4C4
|
|
|
|
Black 0x000000
|
|
|
|
BlanchedAlmond 0xFFEBCD
|
|
|
|
Blue 0x0000FF
|
|
|
|
BlueViolet 0x8A2BE2
|
|
|
|
Brown 0xA52A2A
|
|
|
|
BurlyWood 0xDEB887
|
|
|
|
CadetBlue 0x5F9EA0
|
|
|
|
Chartreuse 0x7FFF00
|
|
|
|
Chocolate 0xD2691E
|
|
|
|
Coral 0xFF7F50
|
|
|
|
CornflowerBlue 0x6495ED
|
|
|
|
Cornsilk 0xFFF8DC
|
|
|
|
Crimson 0xDC143C
|
|
|
|
Cyan 0x00FFFF
|
2017-04-16 10:18:21 -07:00
|
|
|
******************************
|
2016-11-01 11:43:22 -07:00
|
|
|
AliceBlue
|
|
|
|
AntiqueWhite
|
|
|
|
Aquamarine
|
|
|
|
Azure
|
|
|
|
Beige
|
|
|
|
Bisque
|
|
|
|
Black
|
|
|
|
BlanchedAlmond
|
|
|
|
Blue
|
|
|
|
BlueViolet
|
|
|
|
Brown
|
|
|
|
BurlyWood
|
|
|
|
CadetBlue
|
|
|
|
Chartreuse
|
|
|
|
Chocolate
|
|
|
|
Coral
|
|
|
|
CornflowerBlue
|
|
|
|
Cornsilk
|
|
|
|
Crimson
|
|
|
|
Cyan
|
2017-04-16 10:18:21 -07:00
|
|
|
******************************
|
2016-11-01 11:43:22 -07:00
|
|
|
0xF0F8FF
|
|
|
|
0xFAEBD7
|
|
|
|
0x7FFFD4
|
|
|
|
0xF0FFFF
|
|
|
|
0xF5F5DC
|
|
|
|
0xFFE4C4
|
|
|
|
0x000000
|
|
|
|
0xFFEBCD
|
|
|
|
0x0000FF
|
|
|
|
0x8A2BE2
|
|
|
|
0xA52A2A
|
|
|
|
0xDEB887
|
|
|
|
0x5F9EA0
|
|
|
|
0x7FFF00
|
|
|
|
0xD2691E
|
|
|
|
0xFF7F50
|
|
|
|
0x6495ED
|
|
|
|
0xFFF8DC
|
|
|
|
0xDC143C
|
|
|
|
0x00FFFF
|
|
|
|
*/
|