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:

975C5E
25530A
6D068E
F74D1F
694721
E41933
46046C
7B7DE0
540F7E
2E3179
724240
CC9A9E
ABA706
CF6087
0FB826
7F47DA
EB0D93
5F514E
3569CF
57678F
D7DFAF
A3CCBD
1DDA00
422D32
7B1033
C6757D
52F3EB
FAF24A
623032
0DD9A0
411FB8
35E3B6
9916A9
749BFA
C127A6
8F22A1
153D1E
256E74
039E83
53A652
59E796
5A13CF
29707B
0C4C91
F8CB86
BE82D8
C943FB
297CF6
10CCEE
97437D
402695
92F748
F14AEE
C13309
43F986
B5346D
3A5A24
1F122A
F6A2BA
E51801
0E253D
D41AAA
F8690C
E90A38
B3C363
4E4CD0
33E0A6
702681
3F07C1
12DFCD
F4A51B
E911FC
C72061
FFB6CF
56028C
0E9F9C
BC0652
991207
0CB234
7CDEE2
98100D
5F4CDA
D756B2
5CF70A
9D215D
DE2546
6859AB
31C7A5
BCA98A
868849
E9B819
DC08A6
22DD83
1BCC69
8CE3F5
62B37F
3F673F