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:

BFA18A
881F88
1DA410
9CE666
28C14C
F00381
43507F
7B8D91
1C8FFB
36A185
CA761F
BD568F
32826A
F47170
3687CC
39A05A
55D505
7B3ED5
C6EB6E
64604D
6CF290
AC043D
4E69A2
F3B0CC
6894C4
85CD95
BB5866
B9554A
E89C08
FDE07F
828F0A
B56FA0
FF90FF
0AE9CA
90561C
001D39
29DBE6
D0AD6B
BC6537
39F7EA
AF0406
1C00AE
7D5868
1266D0
878D30
1A1655
257AC1
3EEEC5
730415
9FEA1F
807C43
B319F9
3394A7
5552B3
EEA6CB
C566B3
219994
F321FE
6561D5
735DBF
AC1696
AB5868
C67CF0
A81C68
FFA42B
255ED3
9171FD
3F717F
F5D6BC
63E486
946A6D
4B58EB
31DC9E
A5929A
96AC51
1894DE
37DE67
1BE3A7
17E380
0FAE65
5F9B3E
1EAAAF
1C5570
04B175
778313
B5A0F6
9B6FD7
829011