Colour Matching in Forms (Access97/2000)

By Chris Foote

 

If you include images or other colored objects in your form, you will probably want to ensure that the colours look the same on all machines. I ran into a problem with uniform colors while creating an Access form that included a coloured logo. For the sake of consistency, I wanted the background colour of all graphic objects on the form to match the logo.

 

I opened the logo file in a graphics editor in order to learn the RGB (Red, Green, and Blue) value for the logo’s background colour. (RGB values are set with an RGB function that takes three arguments, each a number between 0 and 255, which specifies the relative intensity of one of these primaries.) Then, I set each object’s background property to match that of the logo’s, although doing so required that I create a custom color.

 

Unfortunately, when viewed on another machine, the background colours no longer matched the logo. This time, I edited the image file and created a small (10 x 10 pixel) image file the same colour as the background of my logo. I imported this image into each object— either directly importing, or creating a new Image object behind my buttons and other controls—where I wanted the background to match my logo. I set the Size Mode setting to Stretch and resized the small colored dot as required.

 

Although the logo and coloured boxes still seem different from one machine to another, the colors match each other on any machine!

 


Chris Foote Bio