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:

95A7BC
99E3C7
D60D15
56C75D
7C7E98
B5BD01
FAB33D
48EBEF
B3395D
BCB4A8
1FA738
D19BAF
E68758
ABFE33
0C146B
F8D09E
6CFF70
E263EF
ACCDED
6686C6
35AB15
E3DB84
F2A7DB
8E1EC0
5BA4C1
D88F21
783A8C
E40458
4C14AA
B58358
077DC5
BC825F
F5647B
1F5ED5
06E785
77E9E7
CD6470
2B52FC
66CAB9
0E0CF4
1FEC93
7E70A1
F0BC69
CD3850
80A281
27190D
5370A2
278091
DF374A
18EFC3
9B7FA6
10345D
255064
CA9912
A4DD8D
92FC4F
FC7A0E
3969E0
B07346
0FD539
6574C6
3DB194
8A9BA6
C1B249
E897D8
B8CBDF
47D6D2
3CA94C
98E038
0C779C
DE52E2
CC0582
F7BE82
949808
A09ACD
25B440
924185