Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

outline-color

The outline-color property sets the colour of the outline. To set a colour, you specify a named colour, a hexadecimal RGB value, or an RGB colour value:

button {outline-color: blue;}
button {outline-color: #6633FF;}

The named colours are:

There aren't very many of them but the colours will work on all machines.

You can also use:

  • The hexadecimal RGB values preceded by a hash sign(#). For example, #FFFFFF is white, #000000 is black ,#FF0000 is red, and #0000FF is blue. There is a shorthand notation for some colours, you can use #369 to represent #336699
  • Integer RGB values. These are like the values you see in Paint Shop Pro and quite a lot of other graphics packages. For example, 255,0,0 is red, and 0,0,255 is blue
  • Percentage RGB values

If you supply percentages or integers, you must enter the keyword rgb and put parentheses around the three values that you separate with commas.

You can also use invert to invert the colour of pixels on the screen. This is to make sure that the border is visible no matter what the background colour is.