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:

82D9BB
CC3B27
FC58B9
8DFA88
92A53C
764AC5
DCE90D
370AAC
7D5FB2
F5807B
923CFE
C7ECAA
735F35
ABAF09
EBB827
DB6A98
94DBAC
85655C
B37DB6
1DCB74
F1D262
E530B5
848894
A89179
47508B
6292FE
781B3F
94E85D
4B24D0
E768C1
CA0C33
B7C4BB
C00F2E
0A1EA7
E69676
7E5C82
95B2BE
796087
B42171
288F72
4BDC61
84B272
827296
E74061
81101D
9ECCA5
3DA1BA
C6564B
88D92E
B304B0
E07203
DAB4ED
C6C8FA
B72EF1
189A15
909C33
E2246E