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:

C57F7D
44BA99
F43F50
E31831
1A24D1
1E92DF
0140D3
B77B67
723A2E
5E05F9
0447DB
7F0516
B7256D
9EE202
AB474A
7CC42D
3C4CE2
0E54C2
8433DE
A3B42F
FA4392
426DC7
B08E3A
3C6C33
211EB3
D1CFCA
543050
2EFB0E
0775C2
3AC3C1
EC940C
7A3636
CE3050
490670
392D0E
561B16
30C5B8
6A8AC2
5B25BF
FB42AC
DEFA94
88AE3F
AD9F82
ECF64E
A389AC
08DBD6
47435C
29C1AE
EB3C1B
723B19
24F6DB
351D13
1A1265
3F9CB9
D6F892
FFEA6A
D6504E
C6E71F
1236FA
386444
D7B778
55ACF9
568141
EA9E75
6ED456
C8D158
519014
03ECFC
222070
D6B06C
989597
3D8407
00A8C5
06502F
DECEA3
082ADE
44B7BB
E80A81
73A1EC