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:

F4F34B
1D5A52
07CE56
0FBC45
5C0951
7585A8
4CADE9
11C1FE
CB7691
832208
BBB854
DF303D
C78DBF
D156CF
0CFC18
BA768B
FBA491
56AFA7
902EBB
F0EC14
A23C49
1DC0FF
2E263E
CE0AD7
49B64B
568466
FF170E
453DC0
ED5878
520200
AFA01F
E2CFAD
5A3CD0
547162
48DD71
C7CCAC
C0B9CF
408A23
134426
3273C6
16D6C0
785C8E
BD306E
D80CE4
B77EBE
49C1D6
6F2FF5
8D7F72
1F3A81
5BE4AD
0C991C
50D443
EBCFBF
7EE4B9
D02C8F
6235A7
EC7370
908C64
BD11E4
B924E2
E04D7C
C900F7
9A39A0
B75DED
A7C871
772750
32B511
B9D8B7
CA0BC0
D6521C
690139
182D72
6B6DA9
FCD01E
94BB01
9AD517
F9EADD
AD1824
9ADE36
69FA62
7549A3
2FC438
42627C
F3B2A2
39220A
FD813B
9B9BEC
B72196
731C6B