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:

B87BD9
7F0DB8
1DC3D8
EA6BB6
206AAF
F978A4
103110
B66789
ACEE31
6E4834
7B669F
C0FB75
137B66
C8519D
980A51
AC4882
CFBEA8
B8DC6E
5D05A2
3CAD78
6C4769
0DC3ED
AE1FD5
B81902
B79CAD
8B9921
EFD2BB
0EC518
A61AB5
2E98AD
180023
ED47FE
724C35
C49CFF
BB61EE
AC886C
25B634
D1011F
FE7D80
727F7F
14C273
3CF8F2
D732CA
4DBDA8
B6583E
F085D7
45CA61
AEE7DA
68ED4F
90F7DA
D1D59A
3E48BB
F56539
2BDECD
4E2C48
F7FFB1
3F2199
908B0E
C46817
EDF962
7DDA9E
5821CA
EECDF3
F59117
DE1CA2
10FF88
737361
253058
C37604
E361A0
EE54A0
D1E996
4F70FA
6DDE3A
C30CEC
381B6F
7B73D5
E234A9
2BD2C8
432354