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:

63639B
24C7BE
C2A3A1
25445E
C7C18E
C9FD39
899A26
6EA7F4
F4C53E
28620A
2AB42E
69A8CD
A7C8E3
9C6532
AC4DFC
FF1E00
EC961B
3A362E
C598DE
2C0E21
4EB144
88748E
E7FA35
290531
93D55E
950D1E
0819CD
89B96C
52BB7D
C51610
EE7166
76DA5F
DEE457
F44E99
7EE1F0
02CD1F
6E91D7
BD87E0
041F49
85248F
4C2FA2
D120C9
14E464
A44E00
5E804A
2E5F97
B18F7E
C36F88
265949
4AB179
4201BA
F5B43C
8018CB
D91F38
FEFCCC
495B41
A6E77C
C70E69
487439
80BC08
485434
8A5140
5BB676
235431
FC2901
3F0634
684348
2D3799
508471
F689AE
555977
FBD4D1
CC7B83
3F384E
599CEC
C62459
EB0F16
0AC121
AEBEE8
9B5AAB
2C6413
72EA6B
8F45BD
542868
4F4011
4B85EA
3E58FC
FABCA6
B9CE43
7D6128
46FA78
813112
5962BD
D8BC64
4C2118