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:

6A6252
0F1018
F0A07B
D81B62
3722FF
4D4CBB
638991
6C83A6
9D0B05
C67F8F
BEB8AD
258618
A1D341
DB9541
327A9F
40E9B2
BE7FCD
AB10FB
507B2F
27016B
B85B14
57EAB6
D71511
E9BB02
156825
9476B9
31CA3B
9DBDEB
BE6B11
FA0475
2F9BA6
51757F
21F844
6397F3
3C8E88
05D4A1
71FF80
BF3E38
EE40EB
1B3913
45F186
1C2C93
71353F
1B90AC
3DB8E1
D6D438
CDACF4
6A7640
C32CB2
DB77F5
F1089D
970CDC