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:

4D6946
60AAAE
A9A1D5
76F46E
97859A
478E18
2110C3
3DA6FB
C25251
380621
78EB38
1DC7ED
F4E73E
8C300F
82F7DA
D913B6
0B4A33
55A397
7BEE4B
4257DE
900585
AA1022
33E32E
5067EF
8C3078
5F812C
62B3C2
CAA5D1
D9BBB0
CC0996
9D0923
ABCD95
2BBAA8
FE1358
C4DFAC
26A0E6
043288
8AD6A3
87F892
3061F8
5FEFAB
BE7FD2
9691A2
19CF6E
3E203E
CAF85E
922838
4E9BB2
6A5E42
C83D1E
7E9473
0ED8C7
960887
44D6AA
36A74C
EB898E
99840C
F72A0B
C4A2E7
AF1EB6
902C24
5C7713
B35CF6
2E4B0F
297C6B
D1755D
56D111
130960
D019A6
EDDDDF
1ABC3B
3EFC24
01E1C1
937167
725DFC
CA2402
734597
FFEF79
D0C1E0
060B3C
D0D827
14C4C6
5BAC3A
66A699
C84DFA
0416C6
E7E62A
DE6276
313355
C96529
F66CDA
1FF5AC
4C4162