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:

72A376
B5CB15
0BF263
3D9A8E
03FC37
5E281F
0112A0
91BA83
19681F
8FF8CA
019D35
A97D55
5610EC
A12DE8
478606
E6AB33
F02A65
488CE0
3295CA
F3F562
FD26E9
B6ECD7
F4AB13
B44723
97A7AF
783B48
81C9D6
2DCC18
37CC96
F35C90
1DE2FC
5FF0E5
0AD718
C961A8
E893B7
7EAAA5
5C8CDB
A25D1F
29381A
13607B
755273
D74407
456B2D
98311B
9B316A
1CC0AB
5C122F
F9F28F
08EBDD
E8C6CC
AE8E24
DB985E
D81C88
322536
79ADBE
68B112
B57A65
C8AA86
B7E2FB
C799C2
05CB0B
59511D
A70C3D
3BF708
600068
FF6FD2
38E851
20E683
A74FB4
C87CFA
3B1ACC
5A6BAE
1DDD0A
8424DF
5102C0
73F719
2F1EA2
19FC93
863E48
798952
57DD4D
78A671
9EAE17
5BF7A3
0538A3
9CA077
C88423
1B1CD5
2E7D7F
99E608
3DB8D4
0A6976
2BD233
E73400