Skip to content

Display and control your Android device

Set default background color to dark gray

Romain Vimont757787148019
diff --git a/app/scrcpy.1 b/app/scrcpy.1
index e6518251..bfa1267f 100644
--- a/app/scrcpy.1
+++ b/app/scrcpy.1
@@ -101,7 +101,7 @@ Default is 8M (8000000).
.BI "\-\-background-color " hexcolor
Set the background color, encoded as hexadecimal color code (#RGB or #RRGGBB).
-Default is #000 (black).
+Default is #222 (dark gray).
.TP
.BI "\-\-camera\-ar " ar
diff --git a/app/src/cli.c b/app/src/cli.c
index 155a6019..2cb0d3e2 100644
--- a/app/src/cli.c
+++ b/app/src/cli.c
@@ -260,7 +260,7 @@ static const struct sc_option options[] = {
.argdesc = "hexcolor",
.text = "Set the background color, encoded as hexadecimal color code "
"(#RGB or #RRGGBB).\n"
- "Default is #000 (black).",
+ "Default is #222 (dark gray).",
},
{
.longopt_id = OPT_CAMERA_AR,
diff --git a/app/src/options.c b/app/src/options.c
index d99c65d3..0f541bf0 100644
--- a/app/src/options.c
+++ b/app/src/options.c
@@ -64,7 +64,7 @@ const struct scrcpy_options scrcpy_options_default = {
.window_width = 0,
.window_height = 0,
.display_id = 0,
- .background_color = 0, // black
+ .background_color = 0x222222, // dark gray
.video_buffer = 0,
.audio_buffer = -1, // depends on the audio format,
.audio_output_buffer = SC_TICK_FROM_MS(10),
diff --git a/doc/window.md b/doc/window.md
index 15601fb2..9e0a34af 100644
--- a/doc/window.md
+++ b/doc/window.md
@@ -36,7 +36,7 @@ scrcpy --no-window-aspect-ratio-lock
To maintain the device aspect ratio (when using `--no-window-aspect-ratio-lock`
or in fullscreen mode), padding is added around the device. By default, it is
-black.
+dark gray (`#222`).
This can be changed: