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:

8F1E4B
413198
6E35F8
34EC84
E71C1F
027D54
17A394
C41787
F2C1F2
72159B
262B92
AF5268
C5C937
CD4BE5
299CC8
97E270
666E0D
B9B3C9
ADB6F9
40E838
6A0676
537C07
71F192
5AB21F
CD1242
41F5A9
0489DB
805823
248752
2C739E
141F52
CE6203
B499AA
E91609
CB58A0
7D207C
047B49
40B90E
EA6C3F
93AFD8
33CB54
3BEFBF
FC6B7D
86157C
00D692
2817DC
6F38C9
7939D4
B5D1AE
69681D
DE331C
270437
CD76A6
E74415
4B5FFA
373F92
C8B1E6
18D68A
E7432A