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:

1D9968
A131D7
7259CA
6E03D8
466A08
990F85
59B107
9AF169
00D47F
7397EE
B9BCB0
197B55
805B32
EBD430
2592B0
EFF73C
B605B8
231AE6
8DC50E
D13A0B
85AF97
EDB24B
639E0D
F31B95
69A994
8BE5EF
4D5F53
FEA945
C2EAD9
6F982B
290D14
EE7B15
92674B
43D335
F15BE2
20F23C
D7E068
10C76B
9E6F1F
1F9E33
CCFAF5
FF890C
49A3D7
054AC9
35CCB7
B94B29
B1F26A
B0ADB4
791C0A
29EB18
A92812
FE05CD
3A3712
E6BDC2
74C70F
1ADAF3
E478F5
040763
5F1DD1
8571EB
B37274
A4E664
CCC3FD
004663
28BC8E
A6BAB6
4A46BB
C64AC7
020E30
8C6E5E
9289E0
F7EC7C
59DE41
8F8049
A199D4
15B6B8
3DEEA4
0D6C87
177FC2
9ED6C5
C4730F
7841E5
3AA9C4
5391CB
D47A35
3A6835
71EE37
84D43F
30D6E8
6C4C76
ACCC87
9EB3B4
B66F41
99DC0C
E45D87
7BB701
32FC35
67C8E3