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:

DEB203
4C61AE
1A6537
5B7C8C
51678D
1D9056
26B6A5
2D57D9
F784C8
206C9A
6128AB
96F650
3A1BBA
59F6C6
CB81AA
BFD45C
3D1134
7E958A
992466
D84602
DCF7F4
7107AA
8FFF3C
A6E853
9E75AC
CB14F4
6AAF62
FE4B76
3E7E35
731996
85229D
88CE15
9E993E
28BAC7
30B611
9AB81B
6CEB87
8B0164
E6EAD3
A4A969
79FD56
64CB0A
846AE5
C9A863
B2AB4A
68EC4F
B9B4AD
E0F38C
2F86E2
38E538
95D8F6
F9C125
B0AD85
A85DE8
BAFBCD
A1E018
671CE3
C83EA9
238928
FBAD30
3B361C
F17762
D7773B
706F20
7BA82C
54C80B
EED492