diff --git a/web/pgadmin/static/scss/_bootstrap.overrides.scss b/web/pgadmin/static/scss/_bootstrap.overrides.scss
index bb1a0cc..bdd0ddc 100644
--- a/web/pgadmin/static/scss/_bootstrap.overrides.scss
+++ b/web/pgadmin/static/scss/_bootstrap.overrides.scss
@@ -118,17 +118,19 @@ legend {
  .btn-ternary {
     @include button-variant($color-ternary, $color-fg);
     border-color: $color-ternary;
+
+
  }
 
 .btn-ternary[disabled] {
-  background-color: $btn-ternary-disabled-bg !important;
+  background-color: $btn-ternary-disabled-bg;
   color: $btn-ternary-disabled-fg !important;
-  border-color: btn-ternary-disabled-border-color !important;
+  border-color: $btn-ternary-disabled-border-color;
 
   label {
-    background-color: $btn-ternary-disabled-bg !important;
+    background-color: $btn-ternary-disabled-bg;
     color: $btn-ternary-disabled-fg !important;
-    border-color: btn-ternary-disabled-border-color !important;
+    border-color: $btn-ternary-disabled-border-color;
   }
 
 }
@@ -418,3 +420,7 @@ td.switch-cell > div.toggle {
 td.pga-ex-exclusive-2, td.pga-ex-inclusive-2 {
   color: color-yiq($explain-sev-2-bg);
 }
+
+#datagrid .slick-header .slick-header-column.selected {
+  color: color-yiq($color-primary)
+}
diff --git a/web/pgadmin/static/scss/resources/_default.variables.scss b/web/pgadmin/static/scss/resources/_default.variables.scss
index df115e7..2043b80 100644
--- a/web/pgadmin/static/scss/resources/_default.variables.scss
+++ b/web/pgadmin/static/scss/resources/_default.variables.scss
@@ -219,7 +219,7 @@ $table-hover-border-color: $color-primary;
 $table-hover-border: $panel-border-width solid $color-primary !important;
 $table-hover-bg-color: $color-primary-light !default;
 $datagrid-bg: $color-gray-light !default;
-$datagrid-selected-color : $color-primary-fg !default;
+$datagrid-selected-color: $color-fg !default;
 
 $tree-text-fg: $color-fg !default;
 $tree-text-hover-fg: $color-fg !default;
diff --git a/web/pgadmin/static/scss/resources/dark/_theme.variables.scss b/web/pgadmin/static/scss/resources/dark/_theme.variables.scss
index c7d8245..a033cbf 100644
--- a/web/pgadmin/static/scss/resources/dark/_theme.variables.scss
+++ b/web/pgadmin/static/scss/resources/dark/_theme.variables.scss
@@ -113,3 +113,5 @@ $btn-primary-icon-disable-bg: $color-secondary;
 
 $btn-ternary-disabled-fg: $color-fg;
 $color-success-hover-fg: $color-fg;
+
+$datagrid-selected-color: $color-primary-fg;
diff --git a/web/pgadmin/tools/sqleditor/static/scss/_sqleditor.scss b/web/pgadmin/tools/sqleditor/static/scss/_sqleditor.scss
index 6556508..744d3b7 100644
--- a/web/pgadmin/tools/sqleditor/static/scss/_sqleditor.scss
+++ b/web/pgadmin/tools/sqleditor/static/scss/_sqleditor.scss
@@ -149,7 +149,6 @@ li.CodeMirror-hint-active {
 
 #datagrid .slick-header .slick-header-column.selected {
   background-color: $color-primary;
-  color: $datagrid-selected-color;
 }
 .slick-row .slick-cell {
   border-bottom: $panel-border;
