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:

DAA90A
8320B0
310D6E
EAE172
09D1B7
316CCE
7A8268
967BFE
C310E6
F994A6
DAD8EF
B5EC90
1BCBBF
9A5F1E
ED3758
4DDEA9
C5D722
7CB518
010243
EF4FC4
F04097
902E5E
B9337E
4E9E65
7035E6
180A6D
36AE5C
F152DE
4FC970
AF22C4
2B2A21
01F5EF
947A8C
974994
C2AFB4
C1B2D0
AE2B00
9F98D8
784E40
348D97
4DC9AE
C3977F
6F63DD
78E255
5B8E40
9D3F3C
05E07E
B9A722
3EC63B
3A6718
711E1C
A0ABAC
38C3EB
BDEF00
93E8ED
31312A
06A52D
FD037B
DB0EE7
24A3F4
29D07C
746CE3
479263
E6CB37
F0879F
E4E587
DEA1A4
FE8826
FBD85D
475F06
6C3552
530AE5
6ED5A1
7B4C93
25D660
C16D06
D8151A
F4188A
374330
FAD7F2
9D884A
49E3D3
F9C43D
90A321
509FBE
57DCE9
C2B67B
EB80FC
9ED0F9
68656C
8EB565
943878
FF22CE
4043F9