Native rich-text colours and canonical imports

Version 2.994.2 extends the bounded native rich-text layout profile with the complete 148 opaque CSS named colours, single-colour background cascade handling and layout-colour feature queries, and preserves complete glyph ink in internal layout Forms

The public record layout and API signatures are unchanged; supply the configured font families and styles through the existing headless rich-text entry points

Opaque colour values

Text, background and the existing uniform border-color slot accept all 148 opaque named colours from CSS Color, including aliases such as aqua/cyan, fuchsia/magenta and gray/grey

Named-colour matching is ASCII case-insensitive and requires a complete value; an unknown name or a valid name followed by additional tokens is not a supported colour

SurfaceFinite grammar
Text colorThe complete opaque named-colour set and the existing text-colour hexadecimal and numeric RGB grammar
background-colorOpaque names, #RGB, #RRGGBB and the existing fully transparent no-fill value
Uniform border-colorOpaque names, #RGB and #RRGGBB

Hexadecimal digits accept either ASCII case; the shared opaque box-colour parser publishes a colour only after the complete value succeeds

This box-colour profile does not add alpha hex, layout rgb(), rgba(), hsl(), currentColor, escaped colour identifiers, multiple border colours or general background layers

Single-colour backgrounds and declaration priority

The existing single-colour background form expands to the same slot as background-color, so the winning valid declaration follows source order and !important priority across both spellings

A declaration is validated before its value or priority is stored; an invalid later value, including an invalid important value, preserves the previous valid declaration and does not block a later valid declaration

transparent removes this element's background fill; it does not introduce a stored alpha channel

Existing legacy background clear aliases remain available without adding CSS-wide computation; they do not establish the specified inheritance or reset semantics of inherit, initial, unset, revert or revert-layer

Named colours also work in the existing finite numeric border shorthand, retaining the six complete width/solid/colour component orders, independent edge and colour priorities, and the documented legacy width-only forms

Layout-colour feature queries

@supports reports background-color support for the opaque named and hexadecimal forms above and for transparent; border-color reports support for the opaque named and hexadecimal forms

Unsupported box RGB or alpha syntax, currentColor, multiple values, border transparent, legacy none and unimplemented CSS-wide computation are not advertised by these queries

<style>
@supports (background-color:rebeccapurple) and (border-color:#663399) {
  .note { background-color:rebeccapurple; border:2pt solid #663399 }
}
</style>

The existing conditional operators and ordinary cascade remain in effect; inline important text, background and border declarations keep their independent priority

Internal glyph ink and the outer viewport

Internal rich layout Forms retain complete outline paint bounds, including negative left bearings that extend slightly before a glyph's advance origin

Internal paint bounds and clips no longer truncate that ink to the text advance box; text advances, logical box dimensions and authored positions are unchanged

The final Widget Form still clips to its own geometry, and ordinary standalone rich-text appearance clipping keeps its existing contract

This finite correction does not implement general browser overflow, arbitrary transformed font combinations or broader complex-script rendering compatibility

Named-family canonical imports

The XHTML setter retains its supplied rich value, while the typed rich setter generates a canonical rich value from decoded runs

The public named-family rich import may select a configured family and serialise its name explicitly in the imported canonical /RV

Do not require byte-identical /RV between the earlier typed representation and the family-aware imported representation; verify the intended text, colour, selected family and actual appearance, then compare each stage with its own canonical value

Re-decoding the imported value with the admitted family names and no default family must select that explicit family; repeated encoding under the same configuration retains the imported stage's expected representation

Passive save/reload preserves the prepared AP/resource graph for each stage independently; this contract does not promise arbitrary XHTML serialisation identity across different public conversion paths

Finite acceptance and remaining work

The source-only regression controls (Tests/CABI/NativeRichTextCSSColors/README.en-us.md) retain four Windows profiles: Cascade 18 cases/456 native checks/36 PDFs, Palette 39/2719/78, Integration 21/588/48 and Queries 22/776/88

Palette, Integration and Queries also pass genuine native x86_64 Linux acceptance with FPC 3.3.1-20818-ga205e76e12-dirty and independent readers; the Cascade profile has no separate Linux execution claim

All 148 names are checked in three spellings on text, background and border surfaces, with unchanged clipping assertions and complete saved/reloaded inventories; the three integration imports check stage-specific canonical values and exact AP-resource preservation

General CSS and media behaviour, browser layout, broader editing, complex-script and arbitrary-font compatibility, general rendering and dynamic XFA remain active work in the completion plan