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:

9981BD
94A4BC
CAE095
A920A2
FB7A12
62A9DB
9A6F3D
849553
5C3E7B
8106B0
545A0C
AFED87
D54677
E34FDD
358F60
692173
497BDA
88900F
AB120C
512A44
84B14C
164AF0
03AF87
B0A805
161A31
727C82
EDDC0D
95D959
6D8B35
81B6D9
4425BD
2C75D8
5C8AD8
5159F9
2DC3F6
141447
3F0974
405D78
141D1A
5FD121
4AE252
29EA2D
150A6F
851159
B5AAE1
037150
27945C
200A19
9A46C5
808D42
91D51C
7C0E2D
7CF240
EAEE9E
40866B
B4AF32
1CC11C
46E110
44D2BB
9883FB
28CBA2
5087BA
AEF60F
1ACF1B
C358C0
6FF634
4B5F0B
2E40BD
9BBD6E
DC6211
9A5D3D
01678C
7B77DF
F662DE
808F50
E553B7
FC45A2
7EEBD0
07D150
289D84
A0C816
A7F562
11A1B3
A20A59
AAA6F2
35C06F
861518
BA4C0A
020AA4
44D543
F93CCA
65C9AC
E92449
94A36C
F86A48
ED5162
F2675F
C933EB