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:

7FC070
DE31FB
80C2B3
EADDD5
444711
4AD018
FAFE6A
D2B6B9
9FA653
5C0BA8
67DDE9
AE3246
A408EE
B3A72F
2A8BA7
3E6134
21F90D
7C3F4A
30DA76
0041B6
FC8013
DDB8FE
0EAD99
C3E710
6130CB
60A11E
5E37BD
6DFD25
2142AF
8D932A
E44C10
E44B98
7CCC58
44C4D1
2FDD51
04CABD
8E22A9
9C8E3A
DFC83D
F224E8
62E0F4
681671
C899D5
E52831
0EF462
DF8FA7
E2AADA
65FB09
DE01FB
4982CE
CC1D4D
537824
8A1EB4
0C9BB3
75D8F2
25886C
6A33EE
7D2C91
0DAF40
EDEC7F
C8CD8D
B9B416
5ADFCD
69FCCA
70A1AD
6E75FD
2250EF
859AB6
919F65
65ECBD
05E99C
854F6F
FD99B4
AB0E96
6B734E
E1FC75
2608D3
2A213A
5D709F
3280C0
C008A1
4043AD
2C5E72
F75BF0
622ECF
80E13F
8EEB21
5D259F
FB43EE
BE9676
B1C7EA