Channel Button

There are 3 articles on this title. You are reading the article ranked and rated #3 by Helium's members.

Computers & Technology   >

Software & Web Development

Get a Widget for this title

Understanding numeric color codes in Visual Basic

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.
Contact this writer Click here to send this author comments or questions.


Below are the top articles rated and ranked by Helium members on:

Understanding numeric color codes in Visual Basic

  • 1 of 3

    by Steven Laskoske

    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

    read more

  • 2 of 3

    by prime-Hm

    Visual Basic provides color palatte with different values of coulours indicated in RGB format or hex format. This colour

    read more

  • 3 of 3

    by Rachelle Reese

    Visual Basic 2005 allows you to select from predefined colors or create a custom color by defining Alpha, Red, Green, and

    read more

Add your voice

Know something about Understanding numeric color codes in Visual Basic?
We want to hear your view. Write_penWrite now!

Helium Debate

Cast your vote!

Will Internet Explorer 8 solve Microsoft's Web browser problems?

Click for your side.

170397

Featured Partner

House Rabbit Society

House Rabbit Society is a volunteer-based international non-profit organization with two primary goals: 1) To r...more

What is Helium? | Buy Web Content | Contact Us | Privacy | User agreement | DMCA | User Tools | Help | Community | Helium’s Official Blog | Link to Helium

Helium, Inc.
200 Brickstone Square Andover, MA 01810 USA