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:

66198A
9C2A8A
A0BEB6
CE2BB1
C0668D
3AB890
3D53A4
24DC6A
8D9BAB
68CD82
E247B3
240DFC
D92395
93035F
4218AC
F2B2FE
5D2EFB
BA2871
F69E9F
F18A20
360E39
2C68AC
130021
647A2B
4790AE
BEC4ED
972DD6
79EBCF
9EE49B
6EF16E
C81790
8B7DBB
680BDF
E2D15E
132BFE
F245F1
EEF4FF
570EE9
6CCCC5
5E22E3
340A7B
78E7F2
DC63CE
98C919
C59652
E1E150
4624E4
9CBCD0
8431AF
06EEC4
A59C29
282D6E
98ADE0
996F67
1E1786
82FA68
6E2EDF
5658EC
5B161D
64C3D7
563350
51BF6B
5A3940
34200E
83C975
C50814
D2C1B2
1262FA
305073
2AF27E
0917E1
FE48D4
701B03
07789C
F443FE
7DF5CD
8C3197
EF3F0C
1FB025
DA9EFE
CB45CA
45B16D
AC1BFA
EC19F4
A38EDB
C59F51
AC6747
361E06