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:

0FDCCF
5ADC77
FA1BA2
404131
9129AE
35DE50
E1408C
E6336A
0BD2E8
C5244F
101EA0
40E14C
5361A1
D661DB
E46369
8DDF25
BA72F8
43324B
C96508
2CE506
0A89F1
79979B
47C111
3F09C6
7F4C67
CF14C9
27ADBD
321226
FB4C1E
7ABE84
4D5C0C
905F58
7C3944
7CF763
B9EF39
7A6799
4381E6
B4022C
46D074
ABC0AC
CCB323
3F1B19
9DD41A
D52BB6
87AD8C
DB8DAB
6F4355
2A116B
8393DE
4639ED
7DE330
FE8DA3
23766E
867E19
D849B0
30B95C
0B401D
A9F43A
603E29
8D0967
0D6666
FEF131
29255C
18A98C