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:

388DFC
760E43
7D99B5
4F8141
CF5B5C
CED576
190D21
D3C019
26D603
D17E2F
08AD4A
EE2BF3
61874E
2F99A3
4AEB7C
EFF039
ED85AB
255BCE
513B9C
713A78
AFC25D
61F52A
078CF5
B18FB8
4F14D4
7B054F
574FD7
5D75B4
14D13F
9369D9
911168
484BC9
994520
ECFF84
1AC4A9
4ABE89
99CDE3
2944E6
B73AF5
72D912
9F2C82
C57DF1
BDCFB9
694B40
F0A95F
2E8E75
7F261E
B54837
B886F5
FE2C45
9A100E
4AF617
B0BC1D
60F13F
9BDFB0
C2C5D3
A35FB0
9C1B9B
F82D61
D720DB
5DEFDF
5CE3E7
8E46DB
D04EB4
AEF378
807A21
9EC02A
A7DB74
B5A9D1
7BF18E
777305
4E9507
7053FD
AEB8E1
4C898B
3936A3
230152
524F62
D7A1FA
FBD599
8411F4
B5C632
5ADC8E
688DE4
8086E1
C699BA
F45058
6CB672
188A53
5AD7F2
81DA5E
4C71B6
84DD49
7E02C7
C94EFD