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:

AB0FD9
04AE49
E377E5
8DBA6E
C51E06
F7F69E
761CA3
7A8C79
2F5131
5B50E6
45A65E
9A28FB
4DA87F
9F659C
B9FEBD
5D0C4C
7A3E43
507EC9
851363
C32E8E
942567
24E526
CD7CC5
1E143A
375A23
84C1CA
0BB6D6
C07C69
06A5AF
645356
A6C054
1F406E
08DC40
79FF8C
61EBA5
DF2711
8675EB
D6B872
9CE6AA
42CA1E
65E41C
A6EE35
0E6AAE
1117FB
F77803
E4FBA2
5254DD
766960
2DDF18
ADC24A
7A7F63
F5809A
097798
DF3AA9
A17624
EE7256
A09E51
F8BCCE
D59257
29AFE8
A64269
B3B9EB
DDB86A
BC5C6C
A0B251
81E309
16052F
A99813
9B2E0F
409A3E
9F9879
C160FA
1698BA
98350B
D700E0
3B0ABF
ADDC07
E21F0F
D9CE93
361BCE
3B4D46
2847DC
7A5652
E38D29
855641
F9CE22
FF59AA
1F9C72
6372AF
EBCDD3