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:

58B7D1
0CDA83
995C58
D53CF3
C5EE2A
2EE276
B5583D
49AF0E
B48164
F2C203
024BBB
335161
E142D5
58B3F5
C778E2
87A9B8
4BDD76
9AD330
A4D22E
779D98
AF6085
D1022D
664D92
DE1CCC
A082D5
82C645
06F3D0
B6495F
25A2AD
3C0F36
99F3DA
047E70
6DB107
8E429E
29CEB0
BDB87B
C503B6
0F5B81
3B13BA
99809D
6158AD
08C853
B124DC
505FBF
307781
B75941
A83F3B
48AE4B
60C432
BA02E5
3FC55A
038E4F
9AD435
75CCDD
4C0D8A
3AF362
EE4CE8
DBCF52
7E2960
F241BD
847996
20EB29
C4CACD
009847
F29662
67D089
3B6122
781460
891026
128832
D623A3
7E5154
93D8C1
08B791
D4E991
CA5703
F14160
DF7906
926331
35E925
4FBF1A
79A0A7
9E724D
BBE0A4
86FDDD