There are 3 articles on this title. You are reading the article ranked and rated #3 by Helium's members.
Visual Basic 2005 allows you to select from predefined colors or create a custom color by defining Alpha, Red, Green, and Blue (ARGB) values. Each ARGB component can be set to a value between 0 and 255. For Red, Green, and Blue the value indicates how much of that primary color is included in the custom color. The Alpha value determines how transparent the color is; a value of 0 is a transparent color, a value of 255 is an opaque color. The best way to understand this is with some examples:
255, 255, 255, 255 = Opaque black
255, 0, 0, 0 = Opaque white
255, 78, 85, 226 = Opaque bright blue
50, 214, 71, 189 = a fairly transparent pink
When you configure a custom color in design-mode, you can use a color wheel to select the color you want. The RGB values are automatically filled in. You configure the Alpha value by setting the Opacity property of the control.
Visual Basic 2005 also defines constants for Web-compatible colors. Unless you are planning to perform color transformations, using these colors is much easier than defining colors based on ARGB values. Another option is to use system colors. When you use system colors, you allow the controls in your application to use the colors specified by the theme selected in the Desktop control panel utility. This option is commonly used when writing business applications.
Learn more about this author, Rachelle Reese.
Click here to send this author comments or questions.
Below are the top articles rated and ranked by Helium members on:
Colors are a powerful way of drawing the eye of a program's user. For example, a label in red is easily recognized as an
by prime-Hm
Visual Basic provides color palatte with different values of coulours indicated in RGB format or hex format. This colour
Visual Basic 2005 allows you to select from predefined colors or create a custom color by defining Alpha, Red, Green, and
Add your voice
Know something about Understanding numeric color codes in Visual Basic?
We want to hear your view.
Write now!
Cast your vote!
Click for your side.
Featured Partner
House Rabbit Society is a volunteer-based international non-profit organization with two primary goals: 1) To r...more
hide