Complementary color for dual SIM differentiation

When adding custom accent colors, partners shipping phones with dual SIM can also specify four (4) complementary colors for dual SIM color differentiation. When a custom accent color is set as the default accent color (either by the OEM or by the user), if the phone has a dual SIM, the custom complementary color will be used for the other line (phone and messaging).

  • Sample: ComplementaryColorForDualSIM
    Use the customization samples

  • Constraints: FirstVariationOnly

  • Instructions:
    To add custom accent colors and complementary colors for dual SIM differentiation

    1. Create a .dll that contains the custom accent color(s) display name(s). For more information about how to do this, see Create a resource-only .dll for localized strings.

    2. Create a customization answer file using the contents shown in the following sample or use the sample ComplementaryColorForDualSIM.xml file. This sample is similar to the ThemesAndAccentColors.xml sample customization answer file, but with the addition of the custom complementary colors specifically for dual SIM. The difference is highlighted in the following sample.

      <?xml version="1.0" encoding="utf-8" ?>  
      <ImageCustomizations xmlns="https://schemas.microsoft.com/embedded/2004/10/ImageUpdate"  
                           Name="ComplementaryColorForDualSIM"  
                           Description="Use to add custom complementary accent colors for dual SIM differentiation."  
                           Owner=""  
                           OwnerType="OEM"> 
      
        <Static>  
      
          <Settings Path="Localization/MUI">  
      
            <!-- Use to add your base MUI DLL file -->
            <Asset Name="BaseDll" Source="" />
      
            <!-- Use to specify the language MUI packages (*.dll.mui) for the languages you are supporting and have localized strings for -->
            <Asset Name="LanguageDll/$(langid)" Source="" />
            <Asset Name="LanguageDll/$(langid)" Source="" />
            <Asset Name="LanguageDll/$(langid)" Source="" />
            <!-- Add as many as you need -->  
      
          </Settings>  
      
          <Settings Path="Theme">  
      
            <!-- Use to add custom accent color 1 -->
            <Setting Name="CustomAccentColor1DisplayName" Value="@DisplayStrings.dll,-Offset" /> 
            <Setting Name="CustomAccentColor1LightThemeColor" Value="" />
            <Setting Name="CustomComplementaryColor1LightThemeColor" Value="" />
            <Setting Name="CustomAccentColor1DarkThemeColor" Value="" />
            <Setting Name="CustomComplementaryColor1DarkThemeColor" Value="" />
      
            <!-- Use to add custom accent color 2 -->
            <Setting Name="CustomAccentColor2DisplayName" Value="@DisplayStrings.dll,-Offset" /> 
            <Setting Name="CustomAccentColor2LightThemeColor" Value="" />
            <Setting Name="CustomComplementaryColor12ightThemeColor" Value="" />
            <Setting Name="CustomAccentColor2DarkThemeColor" Value="" />
            <Setting Name="CustomComplementaryColor2DarkThemeColor" Value="" />
      
            <!-- Use to add custom accent color 3 -->
            <Setting Name="CustomAccentColor3DisplayName" Value="@DisplayStrings.dll,-Offset" /> 
            <Setting Name="CustomAccentColor3LightThemeColor" Value="" />
            <Setting Name="CustomComplementaryColor3LightThemeColor" Value="" />
            <Setting Name="CustomAccentColor3DarkThemeColor" Value="" />
            <Setting Name="CustomComplementaryColor3DarkThemeColor" Value="" />
      
            <!-- Use to add custom accent color 4 -->
            <Setting Name="CustomAccentColor4DisplayName" Value="@DisplayStrings.dll,-Offset" /> 
            <Setting Name="CustomAccentColor4LightThemeColor" Value="" />
            <Setting Name="CustomComplementaryColor4LightThemeColor" Value="" />
            <Setting Name="CustomAccentColor4DarkThemeColor" Value="" />
            <Setting Name="CustomComplementaryColor4DarkThemeColor" Value="" />
      
          </Settings>  
      
        </Static>
      
      </ImageCustomizations>
      
    3. Specify an Owner.

    4. Add the resource-only .dll that contains the custom accent color display name by setting the BaseDll asset to point to the location of your base MUI DLL file. For example: C:\Path\DisplayStrings.dll.

    5. Add the language MUI packages (*.dll.mui) for all the languages you are supporting and have localized strings for. To do this:

      • Set the asset's Name to LanguageDll/$(langid) where $(langid) corresponds to the language. For example: LanguageDll/en-US.

      • Set the asset's Source to the location of the .dll.mui file for that language. For example: C:\Path\en-us\DisplayStrings.dll.mui.

      • Repeat the previous steps for the other languages.

        The following example shows the customization answer file entries for en-US, fr-CA, and es-MX languages:

        <Asset Name="LanguageDll/en-US" Source="C:\Path\en-us\DisplayStrings.dll.mui" />
        <Asset Name="LanguageDll/fr-CA" Source="C:\Path\fr-CA\DisplayStrings.dll.mui" />
        <Asset Name="LanguageDll/es-MX" Source="C:\Path\es-MX\DisplayStrings.dll.mui" />
        
    6. For each custom accent color that you are adding, perform the following steps to configure the settings for each custom accent color:

      1. Set the CustomAccentColorXDisplayName value to the name of the resource-only .dll file and specify the string offset. Replace DisplayStrings.dll with the name of your .dll file and replace Offset with the correct offset for the localized string. For example: @DisplayStrings.dll,-101

      2. Specify the CustomAccentColorXLightThemeColor value. The theme colors are in ARGB, so the color value must be specified in the format 0xFFxxxxxx.

      3. Specify the CustomComplementaryColorXLightThemeColor value. The theme colors are in ARGB, so the color value must be specified in the format 0xFFxxxxxx.

      4. Specify the CustomAccentColorXDarkThemeColor value. The theme colors are in ARGB, so the color value must be specified in the format 0xFFxxxxxx.

      5. Specify the CustomComplementaryColorXDarkThemeColor value. The theme colors are in ARGB, so the color value must be specified in the format 0xFFxxxxxx.

      Replace X in the setting names with 1, 2, 3, or 4 depending on the number of custom accent colors that you want to add.

      For example, if you are adding a custom accent color scheme where steel blue (0xFF4682B4) is the main accent color and gold (0xFFFFD700) is the complementary color, you may set the values for CustomAccentColor and CustomComplementaryColor as follows:

      Custom accent color Display Name (REG_SZ) Custom accent color light theme color (REG_DWORD) Custom accent color dark theme color (REG_DWORD) Custom complementary color light theme color (REG_DWORD) Custom complementary dark theme color (REG_DWORD)

      CustomAccentColor1

      @DisplayStrings.dll,-101

      0xFF4682B4

      0xFF4682B4

      0xFFFFD700

      0xFFFFD700

       

    You can use any of the custom accent colors that you add as the default accent color. For more information, see the section To set a default theme or accent color in Themes and accent colors.

  • Testing:

    1. Flash the build containing this customization to a phone.

    2. To check your custom theme:

      • Go to the Start+Theme screen in Settings. Tap the Accent color, and verify that the accent color(s) you added is displayed in the chooser.

      • Tap the custom color to select it as the current accent. Change the background color (light or dark), and verify that the color is displayed as expected. For the second line on the dual SIM phone, verify that the custom complementary color that you specified is displayed for the second line (phone tile and messaging tile).

      • Verify the localization of the color names. In the Start+Theme screen, verify that the name of the accent color matches the correct localized string for that language. Then, for each display language on the phone, go to the language screen in Settings, and select a new display language. After the phone restarts, go to the Start+Theme screen and verify that the name of the custom accent color is correctly localized. Repeat until you have tested the color name for every display language on the phone.