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:

8202F9
283D0D
833DA3
FDCB10
DE602C
3DC265
8F5BED
FF31BB
B9859E
0EEA60
AB2E23
E9A22F
B34375
DA4091
76044F
E16961
E2ADEF
7F93CB
5DB07C
668ADA
E41510
018CFD
34A7A4
F258B7
9B20B8
AD4FD6
2B262B
30CBD2
C951C1
4009E0
A1CCF6
D55EA1
B5247D
595F04
F458FC
CA16EF
0E782A
72718D
A92066
D93EBA
9731CC
5CA3F0
E34806
BC6787
DB1B67
65B67B
3351D4
41F961
D8BF51
F047BF
BAF417
375A5F
FE382F
9E4E94
9B8F24
3BE016
77E563
BEA0A6
1E9621
B4800C
AD2C9B
3DE11B
E94137
068D68
F74C05
86F6A3
069024
35C979
0537BE
6B3214
3696B1
9FA3A1
0EA5B7
14C21B
7CD4BE
487755
45A668
E427B3
4D5CA4
76CFEB
153D6F
D0EB35
DC5AB3
E7822A
C22AA6
9010C5
DE8375
D5B5A5
11489C
424F22
9BD6CC
4D1FEB
5EA1CF
A44D0D