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:

A00FD6
D477C9
32FFB3
078585
C72979
3CAC73
C2E6DB
6A45A8
EE4110
AEBE70
5C2781
078766
2D467C
94E047
45DDDF
81AE02
1384F6
1C9311
842D8B
1BCAC3
B26D86
71BF04
E9EF0A
739799
8F98CB
45E200
69063D
7A8679
1679CF
FD5736
A60FE6
F20320
828469
374695
8E7E6B
573648
F10B51
373304
6FBE78
188D4B
2B07AA
E0B088
19F691
6FE574
0FE590
2B32F8
BB6914
BFD20D
B78E90
EB42DE
C293AC
EA1BB6