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:

EEF1FB
23BA46
F3AE53
366ABD
C1F948
993ECD
F90DD8
E14D76
AF1495
5FF4CC
7B9ED8
A36DD1
FFFF20
60A454
1F52F8
F362FD
DDC8D8
651A28
526927
1EAFF5
78B29D
3A33EA
DB252A
CBA124
E59FEF
DA3210
F3ED93
9F553A
3E1193
E8BE65
ED69FB
DF0636
356491
5E5CB4
C72B24
EE0ACC
7E7B35
98506E
2AE79A
274788
3405E9
024729
C55B9F
F57D92
AEE50B
C37B7E
DA66F3
3397D0
CB13BD
CA1E3A
29E1FF
636136
9623FE
FF6E14
6A03D1
3B03F2
7FFADF
CF1545
28FCE0
0E7D9D
EA91E5
E9EE93
9AC2BF
B633DA
EE0B88
0C8744
02445D
ADF92A
096F81
971B39
811DA2
3AF8F6
F1BB52
23EA4F
FFD761
AD563D
295000
D3DE44
2B4435
AC1AA9