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:

5AA91F
5FAE39
9FC95A
9302AE
1C6EE0
2FEBCE
D36B95
7D85F9
6E1FDE
0BB1B4
9FDF40
04E047
D96D61
B9AB38
6E98BB
A50F02
1BB640
87DC61
2FDA13
95117C
25D53C
578CF8
D35ED2
A720AF
91D690
316B30
3BB670
72FAB4
57789F
FB6C68
002E24
7B4139
258DA8
C9ED85
EB7546
71CA22
43DDBA
77EFDD
91318D
477F7A
47FBB5
8D6272
C3271C
5044C6
3E9498
65F2F8
421A8E
0DC026
37CA9F
BF268D
4D76DF
ECD05E
491A9F
66CFA0
9CBDA9
74BF26
584ADE
A35E42
D3C158
161F8C
52F9BF
FDBDE2
10F1C9
D469BC
A13BD0
966849
C73FEB
E4BE3C
57CA7E
7202DD
D65164
1B60A7
A46205
247A10
A82C26
758545
8280C3
D1C250
47803C
B4CEB8
7ED673
DB48D4
DD4478
ED28F5
99BC7E
30B1C9
16A17C
62E2A6
6B7527
4FBF7F
B9523A
3BF1DB
D6BAE4
A9DDB5
B708FD
A171EE
D31934