Color Table DTD Grammar Documentation
Description
Unified Color table format for pseudo color tables and index color tables.
To provide a first impression on how this format is ment, a simple Color map generator
will be provided. Please contact the author.
Recommendations, Extensions to make this format more useful are welcome.
Index Color table: index color tables are simply a set of colors. The
order inside the set specifies the index number of that color.
Pseudo Color tables: When mapping a scalar value on a surface it is refered as a representation
in pseudo colors. Therefor a list of reference points (control points) and their color values will
specified. A mapping function will then calculate the appropriate colors for each scalar value.
Typically this mapping would be linear: e.g.
for a temperature of zero degree celsius we choose a blue,
for a temperature of 37 degree celcius we choose some moderate red.
If we display a value of ten degree this would end up in a yellow color.
We'll actualy that's not always true, but depends on the color model we use.
It would be true if we walk through the RGB Color space. But if we take for example
the HSV Color space it would be cyan.
(Bare with me is it'f not that exact, but I wanted to add some documentation)
This color format shall neither be restrictive in the way colors are specified nor how the mapping is defined
It even allows for different mappings in each interval. A default mapping dpecified by an
exponent and the color space. The exponent specifies the mapping function
f(x)=x^exponent
It's clear that not all programs will support this flexibility, but it was a design goal to be
as universal as possible.
Element Index
Supported Color Space
Legal color space value. At the time the ones most common are currently
supported:
- rgb
- Triple values ranging from 0 to 1 for Red, Green, Blue
- rgba
- same as rgb with additional value for alpha blending.
- rgb24
- Triple values ranging from 0 to 2^8=255 for Red, Green, Blue
may also be presented as hex number
- rgba24
- same as rgb with additional value for alpha blending.
- hsv
- Triple values ranging from 0 to 1 for hue, saturation and value
- hsva
- same as rgb with additional value for alpha blending.
- cmyk
- Values ranging from 0 to 1 for cyan, magenta, yellow
Element Details
color-table
Declared Attributes
- #IMPLIED CDATA name Name of the color table (optional)
- #IMPLIED CDATA author Name of the author (optional)
- #IMPLIED CDATA version Version number (optional)
- #DEFAULT CDATA mapping-exponent = constant Values= float value or
[constant, linear, sqrt, quadratic] (ignorable for index color tables)
- #DEFAULT ENUMERATION ( rgb | rgb24 | rgba | hsv | hsva | cmyk ) mapping-color-space = rgb
Default colorspace for mapping functions. ignorable for constant mapping, index
color tables.
Element Content Model
(color*)
Referenced by
color
Declared Attributes
- #IMPLIED CDATA value scalar value
- #IMPLIED CDATA mapping-exponent see above
- #IMPLIED ENUMERATION ( rgb | rgb24 | rgba | hsv | hsva | cmyk ) mapping-color-space
see above
Element Content Model
Color values are specified by a function of the color space:
(#PCDATA)* example values: rgba(0,0,0.75,0,5) or rgb24(0,0,255)
Referenced by
color-table