Introduction: Contrast is the difference in the distinguishable colors of an object (or its representation in an image or display). In the visual perception of the real world, contrast is determined by the difference in the color and brightness of the object and other objects within the same field of view.
Contrast is also the difference between the color or shading of the printed material on a document and the background on which it is printed.
Brightness can be in the input range -100 to +100.
Use the following procedure to create a simple sample application for controlling Contrast.
Step 1: First open the Visual Studio.
Step 2: In the menu bar click on "File" > "New Web Site" or press "Shift + Alt + N".
Step 3: Now a dialog box will be shown; select "ASP.NET Empty Web Site" and provide the website name and press "OK".
Step 4: Now open Solution Explorer and right-click on the project and click on "Add" > "Add New Item" or simply press "Ctrl + Shift + A".
Step 5: A dialog will be opened. Select "Web Form" and provide the name of the Web Form (like: Contrast.aspx) and click on the "Add" button.
Step 6: Now a Web Form will be front of you; provide the following code for it: