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:

94CB87
6C6509
94BAFF
7BFD03
F38784
1E4E9D
A0D824
483C4E
11E453
C4BA1C
38CE77
665E8F
65CD93
6C29C1
77E73D
7DEB15
008969
719FB5
51B0AE
F3C9D9
4026A5
4C1119
09A0EE
123140
63A3AB
DCBFC8
B981D7
D63800
5762B8
D32DAD
1ACFE3
AC76AE
BA1F38
DFCDBE
0C85A5
353FDA
F3FBDC
898FF6
361084
6E32FE
5044FA
3E66D2
297D77
0AB607
F650D2
525665
EF5F15
9264A5
FF304B
871A9C
E7482D
6614DD
44E415
7EFE48
CBBB1A
652BA6
569944
15D3D4
FDE578
5F94CF
62B9A1
7224CF
49A27F
A44EF6
3AC287
D67D29
13929E
17EE11
06771C
C07FE2
7368D1
4FC95B
3A0D4A
FD69EE
3F11DC
D4C607
49AE54
C34615
AD68C9
F7268C
2133EE
9A75D5
80854B
070905
30E4A3
0B8FD9
35C7CE
DAEE2F
D7EF7F
B97D31
64BB8C
D93540
CA351B
1522BC