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:

18D6B1
1AA3F7
CC54F7
557910
5ED5FF
5C8966
11BFF6
CB4C89
5111A6
40A39F
B70E6E
B00FBF
854E02
22F0AB
A16506
2C9C86
C90412
D80059
416EEA
602E02
AD0B3C
1B3C1E
B9D54D
C4DB5C
68FB92
FB4410
16AC5E
F89BF4
E63691
E3B506
7F2553
D28C00
FCC0C4
0A49C4
011C1A
47DEBF
A44626
16711E
727E34
B1DF12
1B5C14
7B3948
943551
94A1CC
BCCF6C
7D2E63
208DF4
013C09
329639
B10A15
2EA15B
8D58BB
8B5E8B
1A7D50
6DC123
95BB50
344AAE
BD008B
EBD39A
7B1CFE
52F074
A342CC
08A85F
FA3605
BC4390
362A1E
548EAA
E9A493
617FC0
9E5593
05B16F
816CEB
30FEA7
F7F379
A787D9
9F91F5
E1F08D
9FF90E
B1A285
83F2F1
0BCD80
9ECAAE
A22766
26AC1E
CE1FD2
16AD54
E2BE17
37E861
C3D782
5B2DF9