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:

66588E
0EC0EC
D82DBA
DF92C7
14BE51
72F6BA
D428A5
A7B6ED
75F192
E63399
23283D
F7AA5A
D093A3
1B550C
D67B3B
358DE0
AFF968
0A33B3
F091AF
B41C2D
DE2BFF
AA6AF1
20A95F
918CFD
FDF180
33F47B
1109DF
6D755D
76A3E9
C831A0
BEFABB
1E8B51
B47945
4A6066
DE4E8E
BE38F2
A86A8C
E8C7D2
2B7B57
EA322A
E19CBD
40F8BA
A97E3C
FE2B71
D52008
D091B0
271B31
C462A3
2F5F86
099A36
E5673A
4561E9
64C9A0
70E8E1
F01654
970806
5322AD
CCDD76
E04D54
021EF3
FFA679
5A21D3
A237C0
FA4A51
82B170
D664A0
39968A
D2F945
7C7405
EF6C08
21E3CC
F4DDD5
BD55AB
9302A0
6E9E89
156CA7
B40B9D