1. var paletteHelper = new PaletteHelper();
    2. //Retrieve the app's existing theme
    3. ITheme theme = paletteHelper.GetTheme();
    4. //Change the base theme to Dark
    5. theme.SetBaseTheme(Theme.Dark);
    6. //or theme.SetBaseTheme(Theme.Light);
    7. //Change all of the primary colors to Red
    8. theme.SetPrimaryColor(Colors.Red);
    9. //Change all of the secondary colors to Blue
    10. theme.SetSecondaryColor(Colors.Blue);
    11. //You can also change a single color on the theme, and optionally set the corresponding foreground color
    12. theme.PrimaryMid = new ColorPair(Colors.Brown, Colors.White);
    13. //Change the app's current theme
    14. paletteHelper.SetTheme(theme);