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:

9D87C4
F13385
DB564D
41A783
5B06DF
078DD7
9FA345
395FDF
CEB0F7
A43FD4
8403D5
3E4B9F
A97727
4BA56A
325546
B9ABE4
B5ACE4
03C695
4FA733
94B446
CD4C7D
0A05A5
5B4DFB
E60CB8
64240F
AE8F3C
E379C0
828E30
E78CFB
21B579
72BAA5
AEC955
B604A1
F870BC
E29F5C
9B80F1
8D65BE
B537AE
6699CD
A8E2AA
3D091D
E85D45
63F3B0
39216C
903D1B