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:

D99B02
F1FDBE
87BD3B
312CB7
2BB9FA
A2157B
04561B
AA1BAC
F4C1DD
E1C3C9
E53A59
AB3D39
A13A47
CF91DB
0151C3
13954D
FD4646
A12502
B92526
7ED848
285142
B6A7F0
6975A4
B1A719
993035
B6C2FA
B06273
1587E1
3AECCF
3C9EDE
F1D465
12196C
59D07D
68655E
DD63A6
5753A3
2A5E7D
74B84F
DE0BE6
E44654
215590
45243A
64F957
805E20
EF9377
E91537
FC31D9
7F05DE
B8AE82
DD58F6
328949
E1CF00
F56621
76599D
C86867
9F26C8
A47ECD
F5E782
610F73
8F05A1
C68F1B
857ADE
79131E
89B5F1
458365
53E3F1
5FBBC7
97028A
1BF0FF
114F73
33EC14
9F89C0
F7687C
702B3B
BB520E
4084B5
FA387B
1B7D45
79CB89
932633
20CFB8
D2BF5B
D2F61C
99CE37
A25AED
EA430D
D71193
8B23D9
D0BA63
992E2A