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:

7D65E1
143856
BBCE06
B7A252
783D81
42DAAD
9284C6
D687BD
748CB6
BCB72C
F17291
17E159
D87E46
9CD9AD
FB3113
C40F79
2EE329
DD226F
7D810B
D223FF
66B301
A988E2
944018
161B0C
2C20A0
87F74C
955EAA
97968E
01A718
772870
2E030E
8F2075
26C4D1
8B8076
8C466C
E9ED8A
3052B5
5C6226
EC4200
F95E11
6F9AA1
E4B852
B327AD
877C1E
D0567E
F6D998
271DD6
CCA641
3E453B
69A3F0
8875C0
FC2C67
D04ABB
8985F9
7ACC34
83F56F
2B76F9
155A1B
5BF1BB
D1BB08
30C467
800D7E