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:

510382
2D1E0A
5A7B88
32F8C0
F5307E
9DC791
65D14D
123146
5EB447
659211
DE1546
1D3028
41358D
45CBB4
EF638C
F685B1
1C5BD9
5C0B13
66F4FA
A21A0F
A66D61
2678C1
1B235C
0B319B
EA9F75
6ABF76
D311A2
26538A
DC120C
C69F6E
AB0E13
CF8483
EE060D
40AE5C
02F599
B7350E
DF7BB7
7581C3
CEFF47
D647AB
745108
412152
64783A
DEAB32
817262
9FF3FD
AE79EE
2804FD
AC8B60
CB00DC
E6A482
572B2D
2EDDD7
E806E0
B05B00
6004C1
FCA5DA
283A43
87D1E8
30491E
74B8DB
BFD870
3DBF0C
9C1BDE
BEBFFF
C56471
F0B7CE
F5D6BA
510AB6
6569BB
AE2055
753516
540595
090475
F4FC80
24F3E3