RGB Selector : Visual C#
As you probably know, the various types of colors displayed by electronic visual displays (e.g. computers, phones) are made up of three primary colors – Red, Green and Blue, also known as RGB. These three colors can be used to produce any color, ranging from the brightest white to the darkest black. Now, as a programmer you often need to choose colors for certain elements of your GUI programs, such as the lines and curves in the WCB ScreenSaver. For this, you may have to try several RGB combinations before you get the perfect one, which wastes a lot of time (not to mention the frustration it causes). The RGB Selector program makes it easy for you to decide the appropriate RGB combination for the color you wish to produce.
The RGB Selector allows you to try all the possible RGB combinations with great ease. It has three sliders – one for each color, and a picturebox control (which shows the color produced by the current RGB combination).
As you can see in the above image, you can use the sliders to generate the exact color you want to use, and note the values of Red/Green/Blue components. Isn’t it quite simple? Listed below are a few colors and the RGB combinations required for each of them :
- Bright White – Red (255), Green (255), Blue (255)
- Dark Black – Red (0), Green (0), Blue (0)
- Light Gray – Red (128), Green (128), Blue (128)
- Bright Red – Red (255), Green (0), Blue (0)
- Bright Green – Red (0), Green (255), Blue (0)
- Bright Blue – Red (0), Green (0), Blue (255)
- Bright Yellow – Red (255), Green (255), Blue (0)
- Bright Pink – Red (255), Green (0), Blue (255)
- Bright Cyan – Red (0), Green (255), Blue (255)
- Purple – Red (128), Green (0), Blue (128)
- Yellowish Brown – Red (128), Green (128), Blue (0)
- Greenish Blue – Red (0), Green (128), Blue (128)
The colors listed above are just a few examples. You can try and create 256*256*256 (i.e. 16777216) different colors.
Download RGB Selector
We hope you’ll find this program useful. You can download RGB Selector using the links provided below :
Click here to download the source code of RGB Selector (28 KB).
Click here to download only the executable of RGB Selector (20 KB). You need .NET Framework 4.5 to be able to run this program.
Don’t forget to tell us know whether this program was useful for you. If you like it, SHARE IT.