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:

2DE353
FA4343
ADF35C
9B060A
6DFE64
8ABE42
93110D
97947D
AF840F
019A69
CF560F
108403
CEAEB6
F41790
96F166
AB7A5E
947B9D
B6EE9A
38DA46
C5922B
0E830C
4DE098
993B17
EEAF3E
632039
F33487
AB30CD
2D1AB0
F3C501
8EC00B
3797E4
F74B07
E437A3
F67682
9072E6
D804D4
A6C5EC
500615
5873AF
E33EC1
3446FE
1F1EF9
9BF8C0
EE7F54
DC0F89
1FBC74
4BC503
AC0A4A
155253
5DB3C5
BE9903
25DD72
228575
75451A
FE67FB
1FD21E
13BCF7
5DE35D
8DB814
10101B
8C9E04
E45094
C507AF
19089C
3E0722
8C4E49
564AC3