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:

2F308D
4F42AE
84562B
2C0DC5
A59AE2
B9589F
9422CD
72F260
DF0225
E9E91C
8E5568
AB1D30
70FB03
1FA738
57D2AC
A740C5
DF2240
E3B0E5
8394EF
5AB0EF
571C72
6DAD22
328E55
07BC5A
4FE896
DEE282
74F806
79565E
A2C2DB
DCA668
A17269
540B5D
24D1A7
1AD729
B5B3A9
D8B626
7C8CE8
048439
A57FF0
D2845E
30C818
1FE159
F325C7
C83C0B
AFA74A
71D814
451B8C
26B1CA
B8B583
BF2F4C
7784E9
A50E27
2326C6
C3B4EA
405D1A
6B2AA4
21C00B
799968
51D142
C14BE7
99DCB3
6548CC
49483C
007100
EBB039
6FAF60
8C875A
5CCB88
37624A
DAAC4D
D4D4AF
AB0196
9B89A3
84BC62
67C3F9
11A2C9
369481
FA8345
86D387
B2ED5A
CF6CDD
D15BFB
4E6E17
4C0F0B
86BD10