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:

260EAD
AA96A2
C9FEDC
80FD31
1F80E1
0A839C
9544B2
B228B0
AE90CA
6B18CD
72EB22
B26C6E
02E902
FC06C6
27736F
23D136
3AEFCF
9AE1A1
6A6FBD
E06F16
A47A69
613335
06AFDE
ECB1A3
D85295
BC5A20
FC9C2E
872CC3
078180
44A3A3
64613C
BCD769
899D0B
AD8B76
5302F8
E97DBD
D5538D
4A3EC6
08D2C3
FE8A1A
B7FD93
3E8319
519A09
23C6CA
21C006
5F23C9
C7C3AA
400361
41A57F
F74CDA
52408D
B02006
02CB30
38F707
0657FE
8C95C2
BCB276
C1681D