XML technologies / ePUB / CSS essentials / Units and colors

(Excerpt from “E-Books mit ePUB ─ Von Word zum E-Book mit XML” by Dr. Victor Wang)

Units

Unit

Abbreviation

Meaning

Em height (relative)

em

Font size in the current font

x-height (relative)

ex

Height of lowercase x in the current font

Percentage (relative)

%

Percentage value

Pixels (absolute)

px

Pixel value, dependent on the output device

Millimeters (absolute)

mm

 

Centimeters (absolute)

cm

 

Points (absolute)

pt

Typographic measure (= 1/72 inch)

Picas (absolute)

pc

Typographic measure (= 12 pt)

Inches (absolute)

in

Anglo-American unit (= 2.54 cm)

Table: Units in CSS

 

Color values

Note: OPS permits ordinary CSS colors, although not every reader necessarily displays them.

VGA color names

Description

Value

Note

Black

Black

#000000

White

White

#FFFFFF

Light blue

Aqua

#00FFFF

Blue

Blue

#0000FF

Light purple

Fuchsia

#FF00FF

Gray

Gray

#808080

Green

Green

#008000

Light green

Lime

#00FF00

Maroon

Maroon

#800000

Dark blue

Navy

#000080

Olive

Olive

#808000

Purple

Purple

#800080

Red

Red

#FF0000

Light gray

Silver

#C0C0C0

Turquoise

Teal

#008080

Yellow

Yellow

#FF0000

Table: VGA color names

 

RGB color specifications

Value

Note

#rrggbb

Six hexadecimal digits

#rgb

Three hexadecimal digits

rgb(r, g, b)

Integers from 0 to 255

rgb(r%, g%, b%)

Floating-point values from 0.0% to 100.0%

Table: RGB color specifications

   

 

 

 

back to top