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:

75601A
940B20
9942A4
DDACEA
50EACF
B35EDA
315049
B1D683
FCB28F
207064
C3070E
A7E514
3D477C
97E372
3FEEB0
9747B6
BFF6C3
84BB9F
AE861E
17DF07
0BEB8B
6C74AC
9DAEAC
864C36
B7B8DD
6247EF
AAFC72
44A0CE
71494B
67B99B
FBFC9A
8F8523
1ED975
AEE0DC
B0A276
9A4EFB
0A0D9D
15FFFB
C7AD56
CCBB5D
91928F
9B71E7
048832
0DC836
5C0A86
E2D8BF
E1A4F4
D206F7
4886EB
3DE287
960261
EBB161
E3B2AA
7DCA6E
3B8DB5
1541F0
D03858
B221A9
3879E0
40B884
6F26B8
9B4281
3CCDF9
0F90B4
FBCC86
58A68D
0D5F79
39BE34
4537E6
1BBBC9
290580
FBA581
BBB193
2806CF
F879DC
BA9309
3FFC30
C412B2
B3D605
3BF7D4
E8C21E
F292DB
9C2762
26D2A5
B0C503
CB6F79
2F4CB0
2A59AF
AB6FBE
AD3FBF
B45C17
1863F4
BDC974
FCC061
50AEB4
8A6F4E
6C5BF9
AB25B4