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:

E20FCA
71727D
7922D5
EEAF1F
2CA890
C6443F
E29EDA
0A99E5
7216C6
DAA8D3
ABDE72
080F29
255C3F
0264C8
7E8478
7308A6
87E0D6
A106AC
E2AD6E
331F56
49DE62
CA188A
6CA57E
508623
FE985D
10DCC8
68F556
34D2D2
709576
009C3A
20DF6B
815561
3502A7
BCB3EF
AD0541
E70427
315ABE
1E9014
4C3E68
6BDEAF
0D6205
D2500C
1ECEC3
A89943
B569A1
85F511
9E6787
A7F044
194E4D
12A04A
38337F
A36C41
7711B3
984C45
35A03B
8A0270
E3CDD2