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:

FB13E6
DFB5DC
2BB3AE
E306F7
5B7B2D
A7E004
50FA67
9C77D0
642E08
152946
48E875
989568
5E690C
73E328
100644
5F6C8B
18FC87
F28400
E22904
EDB028
65B76E
873F9C
61FC3B
874891
82A052
69FA95
165A7E
4F8B64
015820
768974
F12A41
989D76
28C62F
626110
139308
923D70
DD9FC4
271652
C767BB
54F56B
2DE3D2
0CBE63
2834A3
1368BF
AAFEFB
49B7E5
F4B881
41EB82
B8122C
DF5BA3
BA5D1E
CAA36C
582E1F
78EEE2
894367
EE9D65
B358A4
8AC976
4A2994
B74189
9882A6
C17BF6
D9A626
0D90F1
A787E9
708CED
67FF14
1DB093
26EA4F
3CF0D1
C0DDB5
ABA713
8D0BA2
DFD410
9B1CFD
9518E3
81A626
6921FD
2291D4
A9624E
B0CC02
740CD0
159888
F54DD7
0741C4
753DE6
18AD93
06BB5E
7FD62A
56C8A3
1D0FAC
149D99
0B54AE