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:

D795E2
A9742D
6EEB27
634E37
CCF50D
411A3C
633918
6558C4
676B98
33CA17
4C5011
22E914
8137F2
AFD430
F8093E
E6EAE6
D29083
036C59
EB01DD
C6FC06
1E69ED
AB6434
249281
B74D5B
0DD460
C38D15
5F2D8F
FFDBED
673D31
A8789D
26E5AC
AC8D08
E762ED
A86689
044C69
DB7946
BFB9CA
D8D4A0
BECD87
4116F7
5F0076
C95BEC
193D7E
B430CD
CB6E7D
B1C61C
6DF704
AFCD44
A8332B
34C2E0
699B4B
B4CA4B
A812E7
A00B5F
098ABC
6DAEE3
D7E3A2
81340C
D349F9
FD9EBE
E2ED5C
8E1E03
B3A4CE
6CA64D
B59C9C
998BAE
D39751
7D27D5
E0B86F
99C490
CFADC1
D005BF
D2DB19
3BAFC7
B373B9
345F6B
DAD180
D7E77B
E63A4A
63B9AF
221B82
B5A8EA
AA8993
5F7BDB
714B91
6E8558
72FDB5
D0A437
055AE4
DECF99
0A17CB
B313A6
805BED
8E641C
A9900B
902E54
E47095
4E0518