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:

B2F1CE
F9281E
01ED8C
97FE3D
9472B4
824DEB
039EC4
E1170F
423201
D94FDF
48A2A8
7A96E7
8773ED
79069E
1777BC
711252
6B3B63
BD5BD3
0E1664
BA6F81
0C8402
A5C338
1D72D2
032D43
49F206
46058A
EF05E8
3453F4
2626F0
8AEEF1
CF1E4F
559081
250744
5B0F0B
AB4B7C
533038
C77CCD
7F2EC7
F937BA
7A9185
B9DCAF
BE4063
088881
40B07E
CF2D9C
42D8A7