Skip to content

[Theming] Remove support for core Component foreground / background colors #555

@kirill-grouchnikov

Description

@kirill-grouchnikov

JComponent.setForeground(Color) and JComponent.setBackground(Color) APIs have traditionally been awkward to support across various Radiance theming features, and with the recent changes in the Radiance color APIs, it is time to remove support for these core Swing features.

Setting a single background or a single foreground color for a component does not scale well with how Radiance handles different component states - rollover, selected, pressed, armed, determinate, mixed. For a while now, Radiance has supported the notion of colorization - using the custom background / foreground colors to "mix" them into the current skin, with the colorization factor APIs in global and component parent chain scopes.

The most recent addition of ComponentScope.setContainerColorTokensOverlay API in Radiance 8.5 should address a variety of app use cases to "mark" a certain element with an "off skin" color - be it one of the system color tokens added in Radiance 8.0 (info, warning, error, success), or a completely custom color token configuration.

Marking this as breaking change, since this will be removing the colorization factor APIs, and also removing the "visual" support for background / foreground component APIs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    9.0 - ObsidianRelease 9.0 - 2026.H1Breaking changeMarking changes that break backwards compatibility

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions