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:

FB75AA
E0203A
3089B2
181A18
043C30
6C185A
F38CD2
EA79C3
9F001C
258173
7D7A01
DDED97
48C8C8
332114
DCD0FA
66664A
B10C5C
CCA932
89E1D6
BE4410
358882
866A5D
708C3A
51E2A5
988129
A67F18
9A3404
B56E7D
B4ED5F
7BF9A2
870B00
41259B
70D582
C1A7B5
9AEEE9
003261
585B06
399534
4F4F24
1E3558
DCBF0F
C6D69E
730AE2
EFE7FC
6150D8
8B4AD8
32DDC1
BE347E
E7025D
F3CBC2
F70F53
0114E9
4235CD
AAC3F5
632E3B
B000D3
81516E
5AD6D5
26D63D