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:

BB247B
1B028C
384E38
1BFCE6
5A2155
53D22B
812465
B341D2
D7F173
2B2E1B
926C5A
668C19
7488F5
BFFDC8
33E7C3
280CB2
AC18AA
533887
7D9787
E0D755
90A443
60F06C
0A45A3
267E90
CBF8CE
BA38EB
967E86
44DB71
88398D
602145
E3C165
9F888B
47FD3E
BD3580
2D1B11
5CD9C5
3DEF8E
A8B74F
95CDAD
8F52B1
8AE015
161AD2
5773E2
904422
527665
7F7764
9C921C
ED91AC
BEA1AD
E66A87
D105E7
70066E
84886E
F04123
140E9A
B42DB5
B9A158
D7CD33
5C9C69
CC059B
5BC730
91AEEA
E08498
96DBEE
C5A665
D70D86
762ABB
3FCCC5
F3FD9B
3BDF9B
548662
908188
85A33F
36AD4F