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:

95100C
D72587
4A5F93
1475EA
FE45DC
730169
B49A22
E026FD
923B39
C3BF66
E0EB4F
AD3F9F
D142AE
F55F2B
16434E
885C06
E9D9E3
410E33
9FAEB6
455CB0
B63401
2E2CCE
8E463F
64AC2E
F13AB6
082811
5D7CD2
A6BC54
033A79
3149A2
0C0A07
E363D7
275327
C5108B
229B3F
4A8441
53DD1B
B197D1
CCA4D9
D40788
C3FF8C
740FCE
190010
94AB8C
CA6163
EBAE9E
21EAB0
9E0BB8
5BD8F9
1CA2D5
C5FCB3
9CA393
8D1B36
61B30E
9AB0D3
E950BF
578B26
64C7A0
41A00B
73A372
BFC3F7
B068EE
4D9788
0C9BCF
80F2B2
9C66F2
B4C860
E6C522
2A4A2F
0DF782
136A2D
83685D
3ADF5B
448D1D
F7D68E
5CD87B
3FCBAD
FA91B4
B21F9D
DA6E8F
1EBC16
259793
27F43A
C51C37
0C5CBC
657E43
E23E9D
B3D356
B46F3E
5BD0A1
D8D81F
FBA853
4F07D8
0A0DDC
BC28FF
D5BFAC
3F8346
0C1CC1
EA670A
57EC03