Skip to content

CefSettings.background_color has no effect #362

Description

@magreenblatt

Original report by Anton Tarasov (Bitbucket: Anton Tarasov).


When I set a background color like (red):
settings.background_color = settings.new ColorType(255, 255, 0, 0);

And then create windowed opaque browser:
client.createBrowser("about:blank", false, false);

It always appears with white background.
On macOS it takes some time before a web page loads, so the white background can contrast with dark UI…

The reason is that the color is overridden in CefBrowser_N.create:
if (transparent == JNI_FALSE) {
// Specify an opaque background color (white) to disable transparency.
settings.background_color = CefColorSetARGB(255, 255, 255, 255);
}

Activity

  1. KlemenDEV commented on Nov 10, 2025

    @KlemenDEV

    Good catch, those white flashes can be quite annoying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug report

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions