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:

8D92F8
EC3FF9
61F803
75A03C
EDD860
C208DB
58C459
B9011D
F29ABE
815CAE
869AA5
9E1FCD
43355E
19F102
E38845
21026C
8144F1
62D0F9
FFDE37
25F772
C0CD43
4CA62B
4037A2
DAA295
0CEB47
932652
88324B
984E1C
D6A6AD
C3BF5B
A41114
978EE8
6BB583
ADDB38
02D5A9
8DE723
B42CF9
73CC43
BD0321
08B4F9
F9A8E5
B6955A
CFABCD
048E8D
0C4011
EEF466
63956B
0E8250
67C8F5
0C18CB
E193CB
C2CD55
124F34
F58CF7
249ACB
1974BF
C835C3
0B330C
5DF0FE
2E82AE
952829
229078
6F31F5
38A714
F357AB
006478
4435F9
57A444
DBC67F
A5A7DD
45A4EA
469085
C04120
2D5727
5ACF6F
31AB7C
E4CD05
51E4D7
C63250
F8C781
C88F33
8D0BBE
D799B0
F45B08
4610C9