O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coloring Shapes

You may have noticed that I've specified colors so far using words like "red", "blue", "green", and so on. In fact, there are three ways to specify colors in VML:

  • Using a predefined color name: fillcolor="red"

  • Using the rgb function: fillcolor="rgb(255,0,0)"

  • Specifying a direct value: fillcolor="#FF0000"

You can use the HTML 4.0 predefined color names in VML:

  • aqua

  • black

  • blue

  • fuchsia

  • gray

  • green

  • lime

  • maroon

  • navy

  • olive

  • purple

  • red

  • silver

  • teal

  • white

  • yellow

You can also specify colors by giving the red, green, and blue color values in the rgb function like this: rgb(rrr, ggg, bbb), where rrr is the red color value, ggg is the green color value, and bbb is the blue color value, all of which range from 0 to 255. Or, you can give those color values directly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required