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:

8F39B3
48E8E1
2EFD5A
FC886F
749ADE
30E0FC
7248DD
81203B
EE07DF
19C895
00677C
D3FE6C
BECE32
E802B6
173E7C
DB16F1
394287
229C48
CBA473
B9BF4E
0A9C4E
EA488D
7B65C4
AD0A8F
3D5678
7DD92B
7FEFEE
BFD12A
33DEBA
F38C1D
762CFC
688C5E
2B4AD4
FC8A34
BCC015
245419
5700CE
7D3F45
C32514
11E059
ADCB15
A4A039
8BA993
8F274D
AEFAD3
C6FD98
016AA0
AA1465
AA47B5
5ABCD5
C3CC26
7D5233
ED940F
9D440F
14F324
8B6E75
0A080A
F19097
798CDA
A628C7
FD9DFA
946AD6
D712F4
9389D1
76D793
8A852A
EBF5FB
B0E298
49668B
0ED529
3F0FBC
B5899E
2BC006
AAC46D
8AE755
B50D10