Home
Source Tarball | Source Zip

This little page does a few nifty things via PHP:

  • Generates a random quantity, between 1 and 100, of hex color codes.
  • Calculates the best color, either black or white, to use for the text to show up when displayed on top of the color.
  • Populates a little div block with the color as background and the label with the white or black text.
  • Calculates two darker shades of the color to be applied to the various parts of the object.
  • Randomly picks one of two different object templates. One faces left, the other, right.
  • Paints three of the parts of the object shown below
  • Combines each of the four parts as layers into a single little object image to be displayed next to its color block.
  • This is the right-facing template:

BD4432
CED333
D8626C
D45140
5C933E
20B59C
AD91F7
1ACAE5
E6A4B2
FDC7FC
A38A23
36608C
8C711D
45755A
7A1D24
E120E1
82C030
F209A5
D66FEC
D93E46
6568A4
1F6814
7D1B06
7BCAD7
99289D
4A49CC
6A98C5
5D9A83
031475
97BD80
D0DE23
57011A
3A45A2
1A0166
484111
1286CF
098043
251AE3
E80A19
FAA8BC
7E2FC1
8979C6
F4D4E1
181FB9
0AEC69
D0BB2E
924A40
D35D8A
41C9DF
9858B3
67BA47
147ADA
7AEC09
BA29CF
48910F
6A1202
EB9AF9
8ABD1C
5B6CDF
0A6684
AD709B
DBE39A
45D92D
0BFF97
AAA920
6077A2
1F93B9
515FE1
5D573F
495608
8CE6F9
4FDCEE
AB3F5A
F649C8
5D7110
16842A
C065D3
4E2781
A7D836
34595B
CC1101
7AEF89
F64238
8922D3
E55312
C2A52F
FE8739
D816BA
9ECBFA
E950BB
798498
AB022F
2A84E6
8F7298
526051
343A02