Use this topic to learn how to use the color picker and web-safe colors in Dreamweaver.

Web-safe colors

In HTML, colors are expressed either as hexadecimal values (for example, #FF0000) or as color names (red). A web-safe color is one that appears the same in Safari and Microsoft Internet Explorer on both Windows and Macintosh systems when running in 256‑color mode. The conventional wisdom is that there are 216 common colors, and that any hexadecimal value that combines the pairs 00, 33, 66, 99, CC, or FF (RGB values 0, 51, 102, 153, 204, and 255, respectively) represents a web-safe color.

Testing, however, reveals that there are only 212 web-safe colors rather than a full 216, because Internet Explorer on Windows does not correctly render the colors #0033FF (0,51,255), #3300FF (51,0,255), #00FF33 (0,255,51), and #33FF00 (51,255,0).

When web browsers first made their appearance, most computers displayed only 265 colors (8 bits per channel (bpc). Today, the majority of computers display thousands or millions of colors (16‑ and 32‑bpc), so the justification for using the browser-safe palette is greatly diminished if you are developing your site for users with current computer systems.

One reason to use the web-safe color palette is if you are developing for alternative web devices such as PDA and cell phone displays. Many of this devices offer only black and white (1‑bpc) or 256 color (8‑bpc) displays.

The Color Cubes (default) and the Continuous Tone palettes in Dreamweaver use the 216‑color web-safe palette; selecting a color from these palettes displays the color’s hexadecimal value.

To select a color outside the web-safe range, open the system color picker by clicking the Color Wheel button in the upper-right corner of the Dreamweaver color picker. The system color picker is not limited to web-safe colors.

UNIX versions of browsers use a different color palette than the Windows and Macintosh versions. If you are developing exclusively for UNIX browsers (or your target audience is Windows or Macintosh users with 24‑bpc monitors and UNIX users with 8‑bpc monitors), consider using hexadecimal values that combine the pairs 00, 40, 80, BF, or FF, which produce web-safe colors for SunOS.

Use the color picker

In Dreamweaver, many of the dialog boxes, as well as the Property inspector for many page elements, contain a color box, which opens a color picker. Use the color picker to select a color for a page element. You can also set the default text color for your page elements.

  1. Click a color box in any dialog box or in the Property inspector.

    The color picker appears.

  2. Do one of the following:
    • Use the eyedropper to select a color swatch from the palette. All colors in the Color Cubes (default) and Continuous Tone palettes are web-safe; other palettes are not.

    • Use the eyedropper to pick up a color from anywhere on your screen—even outside the Dreamweaver windows. To pick up a color from the desktop or another application, press and hold the mouse button; this allows the eyedropper to retain focus, and select a color outside of Dreamweaver. If you click the desktop or another application, Dreamweaver picks up the color where you clicked. However, if you switch to another application, you may need to click a Dreamweaver window to continue working in Dreamweaver.

    • To select one of the different color models, click Hex or RGBa or HSLa at the bottom of the color picker dialog box.

    • To clear the current color without choosing a different color, click the Default Color button .

Dette arbejde har licens under en Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Opslag på Twitter™ og Facebook er ikke omfattet af vilkårene for Creative Commons.

Juridiske meddelelser   |   Politik for beskyttelse af personlige oplysninger online