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:

CCCE72
7E7E28
494FE4
F398E1
865F81
3F54B5
3A6660
563918
7F6D06
6E99AC
59473E
13522C
5F34A7
DE95DC
0AB6B8
C396A8
308620
E1B920
7D9DFE
C1D219
AFB145
FC7C6C
1D4B33
7FBB20
D6A93D
9D22DF
2B6F6D
0D18B2
377172
1E9915
CAD07F
314EA0
FE8340
0D0053
67E1EF
22FC0C
03ECDA
DBA5E6
51F3BD
BE05E6
903F26
ADB929
EE26DE
3532C5
F6D59D
C8F2C0
EBA410
C76103
D1AC89
CFAF19
D3F368
DD57D1
72748A
27E604
A4C0CA
1C14EC
B52E43
B8C54C
E66522
33A5FA
90C777
40ED3D
AB9FB0
413233
028FC7
7D9294
9A7B83
06590F
7D342B
421A48
933D3D