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:

36D6C5
A26C60
F53704
656B05
6DAAA8
B81FDB
08A50A
D36796
24091C
BBF648
2708B8
0312EF
E4AFB3
BA587E
8DD924
858FA6
24D385
5A387F
4D608E
7CAB45
CAA144
66DA3A
5F7EAD
1DE783
8FA1A6
BDA34B
DCAEBB
93E977
797502
3D9532
67C73C
9B8417
C29932
72140E
F57931
ACB8FE
1E7603
243D05
590966
4BB5C5
E8B1AE
E9E122
E9AB70
5B6C1D
6374B4
04140C
A09307
6B6C7C
BCAE3E
29DA52
4A5997
2AF5AF
638928
1DBC32
314188
FB8097
B61BD5
7F5A36
AF657E
39D47E
66EAAF
EF079C
AE5AA2