JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Setting Colors in Web Forms and HTML Pages

A number of properties in Web forms can be set to colors (such as link, text, bgColor, and so on). Colors can be specified in HTML pages in two ways: by using a color name (such as "Red" or "Blue" or "Magenta," which are predefined color names supported by the browser), or by using numbers to denote an RGB color value. In HTML, an RGB color value consists of three two-digit hexadecimal (base 16) numbers (range: 0 to 255, which is to say #00 to #FF in hexadecimal, where # indicates a hexadecimal number) specifying the intensity of the corresponding color, in this order: "#RRGGBB", where RR is the red color value, GG is the green color value, and BB is the blue color value (see the HTML Black Book for more details and examples). For example, "#FFFFFF" is pure white, "#000000" pure black, "#FF0000" is pure red, "#00FF00" is pure green, "#0000FF" is pure blue, "#FF7F50" is coral, magenta is "#FF00FF", maroon is "#800000", and so on. Note also that when you select a property that can be set to a color in the Properties window, a color picker dialog opens automatically, allowing you to set colors at design time easily.

Previous Section Next Section

JavaScript Editor Free JavaScript Editor     JavaScript Editor