In order to change the subtitles color it is necessary to know the color indices that are used in the subpicture stream and then to define those colors in the subpicture palette.
Details:
The DVD subtitles are placed in a subpicture stream in the MPEG-2 file. The subpicture stream contains a series of bitmaps in which the colors are defined not as absolute colors but as indices from a color palette. This palette contains 16 colors and can be defined using the <subpicturePalette> tag in DVDBuilder. The color indices are numbered from 1 to 16. Undefined colors (indices) in the subpicture palette default to white. Each subtitle bitmap uses up to 4 color indices from this subpicture palette.
Example:
If the subpicture stream uses color indices 7 and 8 the DVDBuilder project may look like this:
<?xml version="1.0" encoding="utf-8"?>
<dvd version="1.1.0.1" xmlns="http://www.primosoftware.com/dvdbuilder">
<videoManager firstPlayNavigate="Title=1;"/>
<titleSet>
<subpictureStreams>
<stream languageCode="EN" mpegStreamID="0xBD" mpegSubstreamID="0x20"/>
</subpictureStreams>
<titles>
<title id="1" chapters="00:00:00">
<subpicturePalette>
<color index="1" value="#000000" />
<color index="2" value="#000000" />
<color index="3" value="#000000" />
<color index="4" value="#000000" />
<color index="5" value="#000000" />
<color index="6" value="#000000" />
<color index="7" value="#FF0000" />
<color index="8" value="#00FF00" />
<color index="9" value="#000000" />
<color index="10" value="#000000" />
<color index="11" value="#000000" />
<color index="12" value="#000000" />
<color index="13" value="#000000" />
<color index="14" value="#000000" />
<color index="15" value="#000000" />
<color index="16" value="#000000" />
</subpicturePalette>
<videoObject file="movie.mpg" />
</title>
</titles>
</titleSet>
</dvd>
If the subtitles in this sample are designed so that color index 7 represents the main color (fill) and color index 8 represents the outline, the result will be red text with green outline.
The subtitle color is also affected by the pixel contrast (transparency). The effective color can be a mix of the color coming from the subpicture palette and the color of the video content. Both subpicture transparency and color indices are part of the subpicture stream and cannot be changed by DVDBuilder. DVDBuilder merely remaps already used color indices to different colors.
