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:

3004ED
B57C44
649690
54AA52
D139EB
4B4FA3
D354EA
164055
A147BE
1B281E
8BD603
322398
190C1B
030C3D
1C43A0
BCD4B1
EED5A7
780DDD
9B9CFC
061CBA
6C57B4
93CECB
A9111D
FEA917
06E2CB
ABCFCF
1743B0
A3B557
7A60D4
180C35
84D7DF
4195D9
630A59
E82E17
7387CA
A49757
E12127
F9443C
B1519D
BF255F
638B4B
B80E83
BC8BB8
B9EB69
412D25
65E646
F68E52
960F50
08258F
A26784
A79A2F
39D369
C6EF3E
E019E0
BE0FC5
4B3FAB
B8FCF3
5425F5
15D30A
FE19AD
02092D
115304
2258EF
AE9696
62A70A
A5FE25
E75735
B01734
8B808B
5DDC75
1BDB7F
35867E
5BE25B
75CEFC
DD86FE
F3E1CF
0642C6
8D7AF1
F6D065
385B1A
3ADCD0
A89B15
96ECFD
B3FECF