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:

C29D3D
EE1936
83AA80
FDB579
7F8623
D9FA89
927331
3493E9
83E453
2687A2
9CE52B
01FE3E
FF6ECF
4C866F
A81BDD
5465C0
4B4BA5
AA3C6A
C6CBD7
82FB47
952EC0
94D12E
F1697A
1D9626
AE0CAB
92A58E
F72A9C
34DDDF
F6CD03
8D1E76
9AEC66
4349CF
7FAD8B
6EAE13
3E36F4
07E433
B11785
44AD59
5F5D07
52E545
F360AC
72B80A
7B6A0B
3C4A7E
9B638F
4774A5
D5E8FF
3ADD5D
96C268
35396A
CA3A74
A071D4
07588A
00B81B
C77B81
C8EFD3
532569
3D9A1F
29BE7A
D7A354
805F49
D67A50
52F52C
1A825D
7D1F0D
BC0A2F
D4F9D6
92B316
427D40
8F9452
600224
4F2B98
CB31F2
824A45
A7F25A
6779EA
11DA6D
832519
AAA57C