diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index 7d6745c..97c6a54 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -1179,14 +1179,24 @@
         <item>Cached (empty)</item>
     </string-array>
 
+    <!-- Array of color for sim color for multi-sim in light mode -->
+    <string-array name="sim_color_light">
+        <item>@color/SIM_color_cyan</item>
+        <item>@color/SIM_color_blue800</item>
+        <item>@color/SIM_color_green800</item>
+        <item>@color/SIM_color_purple800</item>
+        <item>@color/SIM_color_pink800</item>
+        <item>@color/SIM_color_orange</item>
+    </string-array>
+
     <!-- Array of titles for sim color for multi-sim -->
     <string-array name="color_picker">
-        <item>Teal</item>
+        <item>Cyan</item>
         <item>Blue</item>
-        <item>Indigo</item>
+        <item>Green</item>
         <item>Purple</item>
         <item>Pink</item>
-        <item>Red</item>
+        <item>Orange</item>
     </string-array>
 
     <!-- Automatic storage management settings. The amount of days for the automatic storage manager
diff --git a/res/values/colors.xml b/res/values/colors.xml
index adee07c..2114b96 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -184,13 +184,21 @@
     <color name="SIM_color_pink">#ffc2185b</color> <!-- Material Pink 700 -->
     <color name="SIM_color_red">#ffd32f2f</color> <!-- Material Red 700 -->
 
+    <!-- SIM colors updated for GAR -->
+    <color name="SIM_color_cyan">#ff006D74</color> <!-- Material Custom Cyan -->
+    <color name="SIM_color_blue800">#ff185ABC</color> <!-- Material Blue 800 -->
+    <color name="SIM_color_green800">#ff137333</color> <!-- Material Green 800 -->
+    <color name="SIM_color_purple800">#ff7627bb</color> <!-- Material Purple 800 -->
+    <color name="SIM_color_pink800">#ffb80672</color> <!-- Material Pink 800 -->
+    <color name="SIM_color_orange">#ff995400</color> <!-- Material Custom Orange -->
+
     <!-- Dark mode SIM colors -->
-    <color name="SIM_dark_mode_color_teal">#ff80cbc4</color> <!-- Material Teal 200 -->
-    <color name="SIM_dark_mode_color_blue">#ff90caf9</color> <!-- Material Blue 200 -->
-    <color name="SIM_dark_mode_color_indigo">#ffc5cae9</color> <!-- Material Indigo 100 -->
-    <color name="SIM_dark_mode_color_purple">#ffe1bee7</color> <!-- Material Purple 100 -->
-    <color name="SIM_dark_mode_color_pink">#fff48fb1</color> <!-- Material Pink 200 -->
-    <color name="SIM_dark_mode_color_red">#ffef9a9a</color> <!-- Material Red 200 -->
+    <color name="SIM_dark_mode_color_cyan">#ff4DD0E1</color> <!-- Material Cyan 300 -->
+    <color name="SIM_dark_mode_color_blue">#ff8AB4F8</color> <!-- Material Blue 300 -->
+    <color name="SIM_dark_mode_color_green">#ff81C995</color> <!-- Material Green 300 -->
+    <color name="SIM_dark_mode_color_purple">#ffC58AF9</color> <!-- Material Purple 300 -->
+    <color name="SIM_dark_mode_color_pink">#ffff8bcb</color> <!-- Material Pink 300 -->
+    <color name="SIM_dark_mode_color_orange">#fffcad70</color> <!-- Material Orange 300 -->
 
     <!-- Top app bar colors -->
     <color name="color_surface_header">@*android:color/surface_header_light</color>
diff --git a/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java b/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java
index c782b66..8e65605 100644
--- a/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java
+++ b/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java
@@ -52,6 +52,7 @@
 
 import com.google.common.collect.ImmutableMap;
 
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 
@@ -108,18 +109,18 @@
         mSubId = getArguments().getInt(KEY_SUBSCRIPTION_ID);
         Resources res = context.getResources();
         mLightDarkMap = ImmutableMap.<Integer, Integer>builder()
-                .put(res.getInteger(R.color.SIM_color_teal),
-                        res.getInteger(R.color.SIM_dark_mode_color_teal))
-                .put(res.getInteger(R.color.SIM_color_blue),
+                .put(res.getInteger(R.color.SIM_color_cyan),
+                        res.getInteger(R.color.SIM_dark_mode_color_cyan))
+                .put(res.getInteger(R.color.SIM_color_blue800),
                         res.getInteger(R.color.SIM_dark_mode_color_blue))
-                .put(res.getInteger(R.color.SIM_color_indigo),
-                        res.getInteger(R.color.SIM_dark_mode_color_indigo))
-                .put(res.getInteger(R.color.SIM_color_purple),
+                .put(res.getInteger(R.color.SIM_color_green800),
+                        res.getInteger(R.color.SIM_dark_mode_color_green))
+                .put(res.getInteger(R.color.SIM_color_purple800),
                         res.getInteger(R.color.SIM_dark_mode_color_purple))
-                .put(res.getInteger(R.color.SIM_color_pink),
+                .put(res.getInteger(R.color.SIM_color_pink800),
                         res.getInteger(R.color.SIM_dark_mode_color_pink))
-                .put(res.getInteger(R.color.SIM_color_red),
-                        res.getInteger(R.color.SIM_dark_mode_color_red))
+                .put(res.getInteger(R.color.SIM_color_orange),
+                        res.getInteger(R.color.SIM_dark_mode_color_orange))
                 .build();
     }
 
@@ -175,12 +176,7 @@
         final ColorAdapter adapter = new ColorAdapter(getContext(),
                 R.layout.dialog_mobile_network_color_picker_item, mColors);
         mColorSpinner.setAdapter(adapter);
-        for (int i = 0; i < mColors.length; i++) {
-            if (mColors[i].getColor() == info.getIconTint()) {
-                mColorSpinner.setSelection(i);
-                break;
-            }
-        }
+        mColorSpinner.setSelection(getSimColorIndex(info.getIconTint()));
 
         final TextView operatorName = view.findViewById(R.id.operator_name_value);
         mTelephonyManager = mTelephonyManager.createForSubscriptionId(mSubId);
@@ -239,7 +235,7 @@
 
     private Color[] getColors() {
         final Resources res = getContext().getResources();
-        final int[] colorInts = res.getIntArray(com.android.internal.R.array.sim_colors);
+        final int[] colorInts = res.getIntArray(R.array.sim_color_light);
         final String[] colorStrings = res.getStringArray(R.array.color_picker);
         final int iconSize = res.getDimensionPixelSize(R.dimen.color_swatch_size);
         final int strokeWidth = res.getDimensionPixelSize(R.dimen.color_swatch_stroke_width);
@@ -286,4 +282,31 @@
     private int getDarkColor(int lightColor) {
         return mLightDarkMap.getOrDefault(lightColor, lightColor);
     }
+
+    /*
+    * Get the color index from previous color that defined in Android OS
+    * (frameworks/base/core/res/res/values/arrays.xml). If can't find the color, continue to look
+    * for it in the new color plattee. If not, give it the first index.
+    */
+
+    private int getSimColorIndex(int color) {
+        int index = -1;
+        final int[] previousSimColorInts =
+                getContext().getResources().getIntArray(com.android.internal.R.array.sim_colors);
+        for (int i = 0; i < previousSimColorInts.length; i++) {
+            if (previousSimColorInts[i] == color) {
+                index = i;
+            }
+        }
+
+        if (index == -1) {
+            for (int i = 0; i < mColors.length; i++) {
+                if (mColors[i].getColor() == color) {
+                    index = i;
+                }
+            }
+        }
+
+        return index == -1 ? 0 : index;
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragmentTest.java b/tests/robotests/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragmentTest.java
index d0df92e..70b0598 100644
--- a/tests/robotests/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragmentTest.java
@@ -159,7 +159,7 @@
                 eq(SubscriptionManager.NAME_SOURCE_USER_INPUT));
         assertThat(captor.getValue()).isEqualTo("test2");
         verify(mSubscriptionMgr)
-                .setIconTint(eq(Color.parseColor("#ff00796b" /* teal */)), eq(mSubscriptionId));
+                .setIconTint(eq(Color.parseColor("#ff006D74" /* cyan */)), eq(mSubscriptionId));
     }
 
     @Test
@@ -174,6 +174,34 @@
         assertThat(view.findViewById(R.id.number_label).getVisibility()).isEqualTo(View.GONE);
     }
 
+    @Test
+    public void populateView_getPreviousSimColor_setCorrectSelection() {
+        final View view = LayoutInflater.from(mActivity).inflate(
+                R.layout.dialog_mobile_network_rename, null);
+        when(mSubscriptionInfo.getIconTint())
+                .thenReturn(Color.parseColor("#ff3367d6"/* blue700 */));
+
+        startDialog();
+        mFragment.populateView(view);
+
+        final Spinner colorSpinnerView = mFragment.getColorSpinnerView();
+        assertThat(colorSpinnerView.getSelectedItemPosition()).isEqualTo(1);
+    }
+
+    @Test
+    public void populateView_getUpdatedSimColor_setCorrectSelection() {
+        final View view = LayoutInflater.from(mActivity).inflate(
+                R.layout.dialog_mobile_network_rename, null);
+        when(mSubscriptionInfo.getIconTint())
+                .thenReturn(Color.parseColor("#ff137333"/* Green800 */));
+
+        startDialog();
+        mFragment.populateView(view);
+
+        final Spinner colorSpinnerView = mFragment.getColorSpinnerView();
+        assertThat(colorSpinnerView.getSelectedItemPosition()).isEqualTo(2);
+    }
+
     /**
      * Helper method to start the dialog
      */
