ColorAdjustment
Description
The ColorAdjustment element replaces color-1
with color-2
at the given opacity
. If color-2
is absent, the only effect is to change the opacity of color-1
. If opacity
is absent, the effect is to change color-1
to color-2
and retain the opacity
. If both color-2
and opacity
are absent, this element has no effect.
Context
Table 1 lists the elements that can contain, or be contained by, a ColorAdjustment element.
Contained by | Element | Contains |
---|---|---|
ColorAdjustment |
(empty) |
Attributes
Table 2 lists the attributes of a ColorAdjustment element.
Attribute | Description |
---|---|
color-1 |
A string value specifying the color to be changed to the value of The value can be any valid CSS color. (See http://www.w3.org/TR/REC-CSS1#color-units.) Alternatively, the special value Note: This attribute is required.
|
color-2 |
A string value specifying the color to which The value can be any valid CSS color. (See http://www.w3.org/TR/REC-CSS1#color-units.) |
opacity |
A floating-point value from 0 to 1 specifying opacity to which |
Example
This example changes all colors that are not white to light green at full opacity.
<?xml version="1.0" encoding="UTF-8"?>
<NamedStyle
version="MXP_WorkSpace_1_5"
xmlns="http://www.mapinfo.com/mxp">
<Interior fill-opacity="1" fill="(#id7)">
<Defs>
<Pattern id="id7">
<Bitmap uri="mapinfo:brush 2">
<ColorAdjustmentSet>
<ColorAdjustment
color-1="nonWhite"
color-2="rgb(224,255,176)"
opacity="1"/>
</ColorAdjustmentSet>
</Bitmap>
</Pattern>
</Defs>
</Interior>
</NamedStyle>