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:

570E2E
02B4D8
845738
F0D418
783B27
D04C29
ACA55C
29E1A1
C11A04
5B8464
85D18F
0B7DF3
89D305
A9CAB2
50732D
D3F5D3
E4D8E3
556E00
7733AE
195050
62CC09
73DF6A
D4CE47
46CAD8
6AB8A6
B34B99
78CEB6
B50B05
EE44E4
AF9E40
A3CDB2
F3F75C
5594B6
DA2058
28F326
A6B4C6
79F542
DAC80D
931EB7
48E467
853DCE
62050F
F638E2
B1B596
089A05
200B1A
05D6EC
FB03A4
5E8962
380972
F0E8FE
0E2E56
5BDED2
E70E73
D7341E
B8992A
058C82
55622B
C4A9CB
B5EBC8
946973
16D355
F5615C
4068C2
C5A3EE
49E0A8
388D79
AD9001
958CE5
4B796C
E31FBA
B800F2
686A95
350655
F68463
FFC9BC
9E9DA2
A3784C
B896DD
31EA0B
B84C15