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:

A6DA47
D88FC3
D596BE
5FB8E3
11CBF4
6738B3
628DAF
CC259A
FC997B
345412
742B80
F8244C
623388
ABE5DD
4B600E
8E5066
A1EBD0
048714
B73FC4
6B4CED
51A362
2B4140
5AE3FA
AC6DAF
83EDEE
838F38
DB65F4
50202B
18A7E2
7C8227
C34020
61E4D9
15C375
942743
0BC7C9
5FBDA2
A7969C
8EBC4B
363DD3
56E6E6
89FA7F
C2A04B
72DD56
1D5257
DA330C
6743F2
11B4AD
98DBAE
E28B16
1D38A7
93D57D
F75708
27B878
1A9CE1
3602C1
7CDB73
30DF01
8F09AB
EDB0C7
FB2800
83E0B3
FEF755
4FBDB3
28845B
648A5F
E6F968
3DD049
A495E6
C58572
8CAE0C
D33FD6
E53765
ACC322
4E0DCA
DA4A66
6C940A
0FB4FC
68FD74
CF8E4C
414090
8956D0
639669
B88AF1
97E2F0
6AA653
02F3F9
735512
609EDA
65A22D
ABDF94
BEA322
80EAF4
4BECD9
DBDB7A
133743
1338E8
32CD87
0F3346
FCA864
E3F4B6