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:

15B3B9
B08519
A6D0FD
C02104
97F553
7DE70D
9A1FEE
7D786D
32CAC5
FB7D5C
935548
4F220A
418B36
85242F
642DF9
FBECCF
E45DC3
591953
A5A041
18D658
E5AC0F
60B8D0
FA4E57
0DE7AC
23D215
B9B4CE
6C56BA
9FB562
6A095D
C71CAA
E224D3
88310E
547A05
A8D82C
B78BFE
2BF16C
F32F2F
9C01C4
23F97E
4DB539
768979
667B14
262B96
8F98D1
B06263
BD72D6
FE305A
C55ADD
69BE24
90E5D7
287C3B
F1DAB7
BC879D
A8C61B
520C5A
56BF16
327628
85F329
B84144
495986
51D7E3
81C4D0
8866BB
CFC88E
ABD0A7
9DB169
5305F3
74A1E9
06EA76
B818A1
623216
01F74D
ED2E74