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:

4F52A1
93E67E
BEDB5C
7AB5A5
84C354
1823AB
CA9E4A
D72E75
00C08A
865212
5F48EE
38DB29
A780EE
64D837
B998D2
CAF08A
227E18
7415EB
A248D2
BFC570
88D6DB
A263BE
80AA24
8D1269
A2A883
F66680
15B2A8
D5470C
5A0810
9B38F4
C2A19D
4B44AD
A75468
5116E7
FDBA84
6DE9E2
6D9F86
62D818
D30166
D37697
E97202
62739F
FF4083
F7BC12
9801DB
F6BD5F
28635C
EDE9D4
5E3C5F
8561AD
FC952F
02509C
699D51
5DD1B2
AB27D2
76CA5C
387815
FCFEED
45E8ED
367146
6A4FF9
EE6E94
AC9706
6460E8
2A20BA
06A418
69C25D
E76838
F66DE6
C93D38
E463AA
3658BF
CA6E67
D78ECE
85B547
946FE7
DD3186
36CAA4
1CE139
750C7F
2999C5
D46D8F
E62AC1
8676F7
D3E440
DCF869
BC6225
4C021B
F1B4E7