diff -u orig/desktopIconsUtil.js patched/desktopIconsUtil.js
--- orig/desktopIconsUtil.js	2021-01-09 18:05:39.000000000 +0200
+++ patched/desktopIconsUtil.js	2024-11-21 21:31:58.703811176 +0200
@@ -114,16 +114,6 @@
     return offset;
 }
 
-function getGtkClassBackgroundColor(classname, state) {
-    let widget = new Gtk.WidgetPath();
-    widget.append_type(Gtk.Widget);
-
-    let context = new Gtk.StyleContext();
-    context.set_path(widget);
-    context.add_class(classname);
-    return context.get_background_color(state);
-}
-
 // Reference the extension org.gnome.shell.extensions.drive-menu
 function eject(mount) {
     let unmountArgs = [
diff -u orig/desktopManager.js patched/desktopManager.js
--- orig/desktopManager.js	2021-01-09 18:05:39.000000000 +0200
+++ patched/desktopManager.js	2024-11-21 21:35:02.369646134 +0200
@@ -84,7 +84,8 @@
         this._discreteGpuAvailable = false;
 
         this._monitorsChangedId = Main.layoutManager.connect('monitors-changed', () => this._recreateDesktopIcons());
-        this._rubberBand = new St.Widget({ style_class: 'rubber-band' });
+        /* Use Gnome Shell's selection rubberband color */
+        this._rubberBand = new St.Widget({ style_class: 'select-area-rubberband' });
         this._rubberBand.hide();
         Main.layoutManager._backgroundGroup.add_child(this._rubberBand);
         this._grabHelper = new GrabHelper.GrabHelper(global.stage);
@@ -132,7 +133,6 @@
     startRubberBand(x, y) {
         this._rubberBandInitialX = x;
         this._rubberBandInitialY = y;
-        this._initRubberBandColor();
         this._updateRubberBand(x, y);
         this._rubberBand.show();
         this._grabHelper.grab({ actor: global.stage });
@@ -235,16 +235,6 @@
         this._desktopGrids = {};
     }
 
-    /**
-     * Initialize rubberband color from the GTK rubberband class
-     * */
-    _initRubberBandColor() {
-        let rgba = DesktopIconsUtil.getGtkClassBackgroundColor('rubberband', Gtk.StateFlags.NORMAL);
-        let background_color =
-            'rgba(' + rgba.red * 255 + ', ' + rgba.green * 255 + ', ' + rgba.blue * 255 + ', 0.4)';
-        this._rubberBand.set_style('background-color: ' + background_color);
-    }
-
     async _scanFiles() {
         for (let [fileItem, fileItemHandler] of this._fileItemHandlers)
             Object.values(fileItemHandler).forEach(id => fileItem.disconnect(id));
diff -u orig/fileItem.js patched/fileItem.js
--- orig/fileItem.js	2022-09-13 05:28:22.000000000 +0300
+++ patched/fileItem.js	2024-11-21 21:33:58.121004243 +0200
@@ -444,7 +444,8 @@
 
     _createEmblemedStIcon(icon, iconName) {
         if (icon != null) {
-            let theme = Gtk.IconTheme.get_default();
+            let theme = new Gtk.IconTheme();
+            theme.set_custom_theme(St.Settings.get().gtk_icon_theme);
             if (theme.lookup_by_gicon(icon, null, Gtk.IconLookupFlags.FORCE_REGULAR) == null)
                 icon = Gio.ThemedIcon.new_with_default_fallbacks('text-x-generic');
         } else {
@@ -651,11 +652,19 @@
     }
 
     _getSelectionStyle() {
-        let rgba = DesktopIconsUtil.getGtkClassBackgroundColor('view', Gtk.StateFlags.SELECTED);
-        let background_color =
-            'rgba(' + rgba.red * 255 + ', ' + rgba.green * 255 + ', ' + rgba.blue * 255 + ', 0.6)';
-        let border_color =
-            'rgba(' + rgba.red * 255 + ', ' + rgba.green * 255 + ', ' + rgba.blue * 255 + ', 0.8)';
+        /* Put an StEntry briefly on stage to get its colors */
+        let st = new St.Entry();
+        global.stage.add_actor(st);
+        let theme_node = st.get_theme_node();
+        global.stage.remove_actor(st);
+
+        let [okstat, rgba_select] = theme_node.lookup_color("selection-background-color", true);
+        if (!okstat || rgba_select === undefined || rgba_select.red === undefined) {
+            [okstat, rgba_select] = theme_node.lookup_color("background-color", true);
+        }
+        let rgba_border = theme_node.get_border_color(St.Side.TOP);
+        let background_color = `rgba(${rgba_select.red}, ${rgba_select.green}, ${rgba_select.blue}, 0.6)`;
+        let border_color = `rgba(${rgba_border.red}, ${rgba_border.green}, ${rgba_border.blue}, 0.8)`;
 
         return 'background-color: ' + background_color + ';' +
                'border-color: ' + border_color + ';';
