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:

35EB53
B6D2DB
CA92F8
0EF6D2
08C9C1
CAEC96
12D377
699956
9C5F29
F5EF79
E77B52
9EEDA3
AC38DC
19F183
914826
F1D6BE
752E6F
41022F
17E5D9
403370
9EA848
2AB526
4BAA96
E2E01B
DC5A9E
0FB707
29D2CF
B83F0A
11403C
579E33
D420A6
222CD2
1369F2
0E3FD2
AC58E3
BB079B
C5904F
883592
64E1A5
C21260
62C643
EE53D6
0AA3A5
D81498
CA5256
236715
40059E
E81FE1
ED452A
C9722D
90DA8A
CA215A
789C55
A67DBE
CC180E
213D9C
DF8C10
C7AE68
B5CC34
B807DA
2D1108
28F8DF
2A99D1
0186C7
236C14
617246
2A2FD8
9C85E5
8714FF
D39794
29E02D
1B840F