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:

6B5C5C
21034B
B6BCF5
1BDA0E
1FE112
7E7A3E
881961
A96E63
CD5224
ED0214
3EFBCA
B944C6
D40303
5C546B
F423DB
28BCB2
532AD8
39DE50
146AA7
964E18
62D41E
347F53
7B8E47
7DD445
F15969
996F49
521B32
C74DBA
10558B
C739FD
E63BAB
BE27C5
B701EB
EA4CA8
8EF959
7821BB
4A107F
913E1C
9260CB
6475AB
6B8463
4878C5
C31807
D22382
94A6DB
5C1169
0DE054
A20EDC
74EB23
8F803D
8B19CC
065E55
E037A7
1B7B36
E30C90
2BB0E5
CB3ADD
DDDADF
0844A9
250E7D
63445E
060918
2CA486
0A5F9E
55D131
E0B6D6