Omni Systems, Inc. Mif2Go User's Guide, Version 55
> 24 Converting tables to HTML > 24.4 Specifying table attributes > 24.4.11 Using shading and color in tables
The row color (or column color) in a FrameMaker table is always one of the following:
As
Is
on the Shading tab in
Table Designer, and set both First
and Next counts to non-zero values:
Mif2Go automatically generates bgcolor
attributes for HTML tables based on table colors in FrameMaker. You can
exclude these automatically generated attributes, while including any
bgcolor
attributes you specify in the configuration
file or in a marker; see §24.4.7 Eliminating automatically generated attributes.
You can have Mif2Go apply to HTML tables the same alternate-row or alternate-column shading you defined in FrameMaker Table Designer:
; UseAltShading = No (default)
; or Yes (alternate row/col shading as in Frame)
Mif2Go uses the FrameMaker definition of row type to
determine the extent of the table body, and not the configuration-file
settings for heading/footing row counts you can specify with the [Tables]
and [TableAccess]
keywords described in §24.3.3 Identifying table headers and footers.
Mif2Go applies alternate-column colors at the cell
level, because <colgroup>
is not widely
supported by browsers.
Where you have specified other colors for cells
via Custom Ruling and Shading, those colors take precedence. Otherwise,
if UseAltShading=No
, and you defined alternate-row
or alternate-column shading in a FrameMaker table, all body rows or columns
of that table receive the color you specified for First
on the Shading tab in Table Designer.
With the default setting, UseAltShading=No
,
if you specify the HTML bgcolor
attribute for
the <table>
element, that background
color applies to all cells. You can have Mif2Go apply whichever color is appropriate (which
might be the alternate color if UseAltShading=Yes
)
in <tr>
tags, as well as in cell tags:
; UseRowColor = No (default) or Yes (set bgcolor for <tr> tag)
; overridden on table ID basis by [TableUseRowColor] settings
UseRowColor
specifies
whether to use <tr>
color attributes.
When UseRowColor=Yes
, Mif2Go applies cell <td>
color attributes only when the cell color is different from the row color;
this is a size optimization. Setting UseRowColor=Yes
might affect the color of the spaces between cells. If UseAltShading=No
,
probably that color is determined by the page or table bgcolor
value. However, Mif2Go ignores any value of bgcolor
specified as a table attribute in the configuration file.
If you set UseRowColor=Yes
,
Mif2Go writes each table row using the color specified
in your FrameMaker document (as modified by settings in [Colors]
),
provided that color is not “invisible”, and has a tint greater
than 1%. Then, Mif2Go puts out a background color for each cell, if
the cell color or tint is different from the row color or tint. If you
specify UseRowColor=Yes
it does not really
make sense to specify a table background color; it will always be overridden.
If UseRowColor=No
,
all rows are considered to be 100% white; Mif2Go writes out any cell-level colors or tints that
are different from white. If UseRowColor=No
,
and you specify a table background color in HTML via bgcolor
,
you are likely to have trouble unless the table background color is white
(#ffffff
), in which case specifying it is redundant.
If you have a cell where you want white, and you have a different table
background color, you get the table background color in the cell instead,
because in effect there is no cell background color.
The setting for UseRowColor
applies to all tables in your document. To override this setting for
selected tables:
; table ID = Yes or No, overrides UseRowColor
See §24.2 Defining sets of tables for ways to specify a subset of tables.
Mif2Go follows all override settings for shading made
via the FrameMaker Custom Ruling and Shading
dialog; these settings overrule both the Table Designer settings and
your UseAltShading
setting.
Table fill colors are treated the same as text
colors (see §13.7 Defining and mapping colors for HTML);
the [Colors]
mapping works the same way. Mif2Go specifies an HTML table background color and
individual cell overrides as required, including using the correct heading/footing
color for the cells in the table heading/footing rows. Choose colors
and tints such that all the resulting colors are Web-safe. See §13.7.4 Using Web-safe colors for more
information.
You can use a table fill color that is just a tint. However, doing so might not give you Web-safe colors; a 100% tint of a distinct color is often a better idea. But not always; in one test case, a “highlight” color is applied (via Custom Ruling and Shading) to a set of columns, and shading is applied (via Table Designer) to alternate rows. What happens to cells that fall in both a shaded row and a highlighted column? If the alternate-row shading is a tint (for example, 50%) of the same color used for highlighting, the cells are tinted in the highlight color. But if the alternate-row shading is a different color, with 100% tint, these cells are not tinted; they are just highlighted, which looks a bit odd.
The effect on border colors varies by browser; some use cell attributes, some use table attributes.