How to enable top bar background opacity? [duplicate]

WORKAROUND

Using this post Install Adwaita shell theme on Ubuntu 20.04? Extract the contents for the default theme /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource file.

enter image description here

Then from the Yaru directory in the above pic, copy the gnome-shell.css file to $HOME/.local/share/themes/myYaru/gnome-shell or $HOME/.themes/myYaru/gnome-shell directory. Create the Directory's as necessary.

[ here in this file gnome-shell.css, there are some paths which specify resource you should play tricks if theme is not effective with those paths ]

[In my trail It was not needed. But you have to play tricks with the folders and paths if something is not showing properly.]

Example:

  background-image: url("resource:///org/gnome/shell/theme/checkbox-off.svg"); }
  background-image: url("resource:///org/gnome/shell/theme/checkbox-off-focused.svg"); }
  background-image: url("resource:///org/gnome/shell/theme/checkbox.svg"); }
  background-image: url("resource:///org/gnome/shell/theme/checkbox-focused.svg"); }
  background-image: url("resource:///org/gnome/shell/theme/toggle-off.svg"); }
  background-image: url("resource:///org/gnome/shell/theme/toggle-on.svg"); }

to use this shell theme myYaru you need to install User Shell theme gnome-shell extension.

then select it from gnome-tweaks

enter image description here

now you have the local copy of the default shell theme. so you can edit gnome-shell.css file in this local theme.

now open the file $HOME/.local/share/themes/myYaru/gnome-shell/gnome-shell.css

and go to line number around 1141;

/* Top Bar */
#panel {
  background-color: #1d1d1d;

change this with rgba color to control the opacity.

example:

/* Top Bar */
#panel {
  background-color: rgba(0,0,0,0.4);

save the file and refresh the gnome-shell with Alt+F2 'r' Enter method.

enter image description here

with opacity set to 0.05 i.e rgba(0,0,0,0.05)

enter image description here