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:

A28DA4
955802
A37DC2
EE8DA5
C3ED44
E246F1
5B2CA8
27B71A
CFD021
C436E4
9D7F3C
4963B1
9BDB11
17A8D5
BF9188
58CA95
2C2678
6371C4
69A137
2A2B13
12C9C5
25304A
D7C826
F52915
D852B9
125305
4DACF2
13250E
A06BC5
8F0F72
FC684D
1B8BC1
95F132
D06FE4
70FA2C
9C8E02
4A3181
B79366
BE823E
686BF8
E035F7
7CE76E
6DE2F5
D23614
12758B
8C2C6E
E0EA8E
D4B12F
AF8972
83FC3F
7109DD
4C7234
85EE87
CBD013
6C750B
AA385C
DE5EA8
F36B15
5251B0
F8B2CB
DD9947
D0884B
CE955B
638385
BD48C3
CC5524
6C21BD
1700F1
44966E
3F61ED
88B26C
3F028A
32E613
CED415
801717
1F03E2
EC54B3
03DF21
3A2E98