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:

D30C41
E4216D
666429
86227B
52FF3D
BA1B54
F24F93
0850B7
D5A88C
F096D2
F6AC73
E2B294
06DCC7
F55869
AB0A2C
6E3B96
AE7045
5E75E9
6DF3F6
751177
13C4A2
17B66C
E84EB5
B4FB44
79568F
08C650
6E05BC
129D8F
89B992
C9D879
984205
7BE3E4
FFFD14
FA7670
CB28D5
04FEEF
7E01FA
A08CFA
1CB74E
19C4D9
6EDE7E
4159D5
5B83CC
C554C8
57A93B
287D38
FCF1FC
A693C4
FFE941
BE8B9E
588CDA
58F3C0
8F25BB
8BCC33
C89EA5
49B81E
2C975A
703123
AA9F38
78E75D
88CB3B
87DE5F
4A1CA1
852DDD
2848E7
A62F1E
FCB51B
60B795
D1D366
08556E
903E9D
C8E897
4D724A
B4E832
69AC84
55B9E7