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:

263023
A7CE26
D0E86F
2D15FB
5DD76F
05C42E
2FB527
5DB123
25D5E4
6F3276
A7994B
803BEC
BA6DA5
79A64F
6B0DAB
0ECF8A
E8213E
F1C556
7D44A8
D1FBCA
FA1492
B839B8
4357D5
5D558F
95B78C
B58DED
E5E25C
434297
B1BF1F
62C1CD
96DB4A
395F1C
CAE31A
02A26F
991F54
080C58
3FDAAB
182806
7E3B50
601E44
87033C
DAFC4B
B9F2C3
AC5AC1
33DC24
C3D1B6
B0810E
9A8196
990A9A
41BEEC
D47EFC
5B611D
0CFB9D
FBB0B9
493096
B1A6DF
E69186
C13C42
CB561D
E7E325
BD7015
BA540E
9FFC8F
FBE468
6835C6