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:

559071
C2FF65
27A928
2B3829
52D926
E2D62F
1AE70D
B1868D
DAE619
53BCC1
A16255
1588F4
BE71F7
3CFEC4
DEF980
F49D4F
FA35AE
F987FD
B3CA32
28E5C1
4E8E36
0B0F99
8F2E22
601796
83F2AC
CA615E
2BA25D
B84380
F65573
CE4AFE
0C74B7
621BCF
31E8B7
0F86F5
5A473D
AAC139
76112C
0A0C09
9EFF6D
5E22A5
23ED0E
12078A
9333DB
55F478
81C485
9BBE81
1AB72A
9158FD
532A09
9A9B40
20F9B2
8D5C56