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:

4CCFA1
D1566F
13AE75
143A25
FB282E
2BA2C9
91BD17
E3CBB1
7D8D1C
C201D3
CA38B3
1F3874
C54C83
0A8B9D
1FCEB2
E7FF8A
198078
45C9AB
C754BA
70F3F0
3E638F
977879
517BC6
75E4B8
B473B6
0DC852
598C8F
22AD27
F42704
32C2A2
ABD24B
0244F5
D8039C
5ABA97
52F815
788A17
FF5EF5
9BC4AF
768629
104E1A
834620
712159
F8621E
DBF188
11435C
F34772
4B479A
ED4934
DF4F2E
45395A
262221
FAE42F
89CEDE
147AE2
35EDA8
F3CFC4
6C61C2
36DB2D
C4660B
4AA718
25E93A
8740C5
BAA374
5985BD
4BC58C
6CA55F
D9F0B6
229A6B
3036AE
53294D
447FE6
93C6FF
3EBD57
5486A2
83DCD0
D57C35
7C2971
1A8CC6
B51730
5CD9DF
F663FE
250499
EE21F6
9B7C21
55F25D
2032A3