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:

76483A
9DC397
EBF7BE
B30A82
77D54F
615892
3AB1E6
C9E2CF
358111
25C418
A66BCB
BE49E1
1787EC
524D7C
4BBD50
A60664
85F2EF
AC190D
7713AB
F5860E
D2FE19
75DA3D
77A6CE
D30BD9
066085
B8A880
0F74C6
E8EEF6
92132F
BAFA6A
0D2800
C1044C
B5D930
696F76
EF7204
35EA30
F3BCC8
619F73
1AECF5
724CE0
B1B334
4F49B4
9A9F01
304C66
6FD26E
BA176B
D9D768
568E51
EEE2AC
C246E3
B61237
C019C8
AFE800
ED618E
63C4F6
562615
B5E0B1
129D20
045D1F
4D2076
F4EBBD
7B6ADB
91E4D3
08D707
C602EB
A9F860
1BB770
EAC567
6D3E78
F22747
894733
D72ABA
FC2EAA
C03A9E
094241
F44970
431115
8D4609
C25D08
2BC8C4
EF0F3F
148099
442E64
8E5E21
0E6104
8143BA
8521A5
33AAA0
35959C
08B768
9D7E8A
93DEA5
001382
457478
5F4E3F
131408
63619D
067974
6B22C6