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:

185EDD
CD76A5
849C56
A1AB4B
55BE29
4FF64A
AFFE95
198C5A
DBB1C4
211AFB
F84997
A67073
DD8635
233F16
AF3AE7
1BAE81
9E2BE8
FB16F2
9E8417
25FFC0
422C3A
E10989
3AE632
5C3AA8
4DE5BD
C7B37B
81A8A1
037B98
94C534
AE16C6
140ED2
EBB345
8F54F0
D590E3
6608AB
EE2751
B2597E
88F6F1
D4E45C
4167F2
52E96F
C36A46
0041E8
77D8EC
955BD2
436AB6
8C22F2
1E8515
57FA47
E9EB4C
D2FD37
6622AA
6C6178
3C260E
3BF5BB
C6DADD
8D7F25
A89C8A
13D183
1811F7
4823A3
EF8FC2
61A11D
0F1AEA
3FCB10
A8E0BC
9B0E41
0C9B14
5C3F27
6F1E11
D4C582
0AE7E4
904DEF
80B576
E1BD25
7CF49F
87164B
0BD507
605C8C
0333AF
862590
170177
E23D7D
477F1D
408790
158F51
B40F99
6781EA
0ABF98
CDECEF
1007DE
67B795
15E3AB
EF565A