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:

6D9DB9
83AA75
FAB41C
D6ED9A
0CA4C8
8186EF
BDF0BD
5C3736
0B5B93
CA6915
425EA9
3DB62B
6E7CAE
ED93CD
7F2E62
7F9FE6
118310
9C8E93
ECCCA6
F175A0
75A0B7
94A541
7E842A
1A00D7
8E90C2
6E8662
EBAAB8
6BEDDD
BB6018
3CD490
E1F3AC
F66B3B
DAE291
AFA051
9A352D
632B7B
E629BF
EEF5C6
30BCB4
5AE90A
8602BB
1C8F5B
48DDBA
197E07
749121
65BFFE
89645E
7419EF
791F6F
26E224
12DA7F
23FB22
1AE53B
4EFC68
3DB380
D60A3E
7EA145
FAD529
3907A4
CF4DC1
EEEC55
CCBAA6
0D6969
2D7110
FF712C
F7EB74
900501
A04F51
F5DBA5
4442CC
589614
4A3252
EE5CFD