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:

2FCE32
C4BB6E
04D1F6
8CD7CF
A5B8A8
D82090
1F0EF4
EE3383
A65FF3
E7B4F7
26BDEF
51FCBB
F5998E
B85E64
17979E
96E679
3CEF49
44A8E0
FC49F1
CC0F7F
DD6887
335662
428FE5
EB59CC
8AD7A7
9610DB
4CC30F
ADB547
94FD8B
596AAC
457793
548B41
E3B2ED
BD845D
6603A3
62EA4B
31CD2F
B42722
C4B459
7E0D38
3DBEF3
91AF60
0061C5
B38EA5
9F4381
8EA074
961FB6
D118A3
EF2198
3F0278
DB1BBA
2959DE
6E8A22
78D155
2AB041
A533B7
AABF0B
2068C1
3F567B
E436D1
970963
6FE54E
C05B44
4FBBDD
940741
15F06E
783297
75742D
0CEA66
AC4AB2
58600C
A05926
7E59F6
E1F5D8
C9BC22
4D500F