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:

9BF445
ECF41C
DD4E0E
51BF2C
2E909C
EEF3EB
F8DC03
831CAB
A5AD9C
A570A4
2550A2
9C9C10
B95725
C99D4B
55EF34
D9EF27
2EB400
0D79CE
16422D
F0A9BC
6ED53E
06272B
DC267C
686F92
6200C1
307813
09C409
506200
BF65F5
DF73B3
4A02E8
FE298F
23846B
480296
61CCCC
3EBA45
957DDA
055B2A
F35DF4
7F2A29
494AF6
947FCD
CE32F3
DE9936
45D0F1
3D4698
2F14CB
DC8888
590BF6
7AFC75
669200
1B1689
DDDD45
6BF566
2AE729
C41C57