Convert any color into a web-safe color.

Category:
Screen/Graphics
Type:
Snippets
Difficulty:
Intermediate
Author:
redbird77

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
This functions takes any color as a long and returns a long representing the nearest web-safe color (i.e #ffcc66 instead of #fea278).

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: