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:

85B519
B0D9E3
8BF0CC
F17CF1
8D9418
5D7653
0D7635
FC9C80
8A6407
CCD220
256EA6
5B28E2
2134DD
7123B4
B29003
279BED
9E133F
7113E1
AD0477
E082A6
88534D
2CD055
A09891
C8BEB9
3A063D
DCB0F8
7C4F03
C00431
95B5B9
2E578D
D8A1A8
6C173A
4D662F
64C5AC
D83FFE
205B1A
E760A4
A65AE8
6C3008
140041
CD4923
8743BB
AF6B96
315D7A
C9484B
8E2AA7
AF7768
45E4AD
FAFEA7
6653FF
6F76DE
5BFC0B
A0B13C
32A95E
B6A746
FAC9CA
70FDF2
EF3CC4
52A0DA
5E6C8E
714C36
465167
0B0572
6B3D23
A0F744
77A06C
745C5E
3DE0C3
095742
DDE4AB
8CE00F
DE40FF
B89362
DE5EB1
6439FA
801BC1
88BB71
1ED7FB
2B932C