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:

6B72C3
939804
36331A
C402B6
674400
8C730B
2FD132
28AC60
422140
563926
C01F45
80FE51
F7DA97
12697A
98F406
1EAEBF
285AEC
68B01A
C4350C
C5637D
07BE13
C993A5
56FC4A
10F8AB
1D245F
4CF88F
968A68
08B62B
E0DF21
1E6440
71A305
D95355
A67781
85C59B
6DC36D
FCFD43
BD0A60
31E0F0
AF03AA
6532F5
929177
83DCFB
3E3289
DF96D5
5BD3F4
CC7F68
B6301A
667323
83AC63
8745AD
C57710
9F2017
F5CFDD
F6BD24
B4932D
5225A2
4CB767
9F9079
147173
4205E9
C42393
25F797
15AFDF
93F35F
703C5D
71ECE9
430BEA
E9CAB3
E3D206