Repository: microsoft/terminal
File: src/cascadia/TerminalSettingsEditor/ColorSchemeViewModel.cpp (C++)

Code before:
            }
            else
            {
                _BrightColorTable.Append(entry);
            }
        }

        _ForegroundColor = winrt::make<ColorTableEntry>(ForegroundColorTag, til::color(scheme.Foreground()));
        _BackgroundColor = winrt::make<ColorTableEntry>(BackgroundColorTag, til::color(scheme.Background()));
        _CursorColor = winrt::make<ColorTableEntry>(CursorColorTag, til::color(scheme.CursorColor()));
        _SelectionBackgroundColor = winrt::make<ColorTableEntry>(SelectionBackgroundColorTag, til::color(scheme.SelectionBackground()));

        _ForegroundColor.PropertyChanged({ get_weak(), &ColorSchemeViewModel::_ColorEntryChangedHandler });
        _BackgroundColor.PropertyChanged({ get_weak(), &ColorSchemeViewModel::_ColorEntryChangedHandler });
        _CursorColor.PropertyChanged({ get_weak(), &ColorSchemeViewModel::_ColorEntryChangedHandler });
        _SelectionBackgroundColor.PropertyChanged({ get_weak(), &ColorSchemeViewModel::_ColorEntryChangedHandler });
    }

    winrt::hstring ColorSchemeViewModel::Name()
    {
        return _Name;
    }

    bool ColorSchemeViewModel::IsDefaultScheme()
    {
        auto defaultAppearance = _settings.ProfileDefaults().DefaultAppearance();
        return defaultAppearance.LightColorSchemeName() == defaultAppearance.DarkColorSchemeName() &&
               _Name == defaultAppearance.LightColorSchemeName();
    }

    void ColorSchemeViewModel::RefreshIsDefault()
    {
        _NotifyChanges(L"IsDefaultScheme");
    }

    bool ColorSchemeViewModel::RequestRename(winrt::hstring newName)
    {
        if (const auto parentPageVM{ _parentPageVM.get() })
        {
            return parentPageVM.RequestRenameCurrentScheme(newName);
        }
        return false;
    }

    void ColorSchemeViewModel::Name(winrt::hstring newName)
    {
        _scheme.Name(newName);
        _Name = newName;
    }

    void ColorSchemeViewModel::_ColorEntryChangedHandler(const IInspectable& sender, const PropertyChangedEventArgs& args)

Review comment (suggestion):
```suggestion
        const auto defaultAppearance = _settings.ProfileDefaults().DefaultAppearance();
```

Code after:
            }
            else
            {
                _BrightColorTable.Append(entry);
            }
        }

        _ForegroundColor = winrt::make<ColorTableEntry>(ForegroundColorTag, til::color(scheme.Foreground()));
        _BackgroundColor = winrt::make<ColorTableEntry>(BackgroundColorTag, til::color(scheme.Background()));
        _CursorColor = winrt::make<ColorTableEntry>(CursorColorTag, til::color(scheme.CursorColor()));
        _SelectionBackgroundColor = winrt::make<ColorTableEntry>(SelectionBackgroundColorTag, til::color(scheme.SelectionBackground()));

        _ForegroundColor.PropertyChanged({ get_weak(), &ColorSchemeViewModel::_ColorEntryChangedHandler });
        _BackgroundColor.PropertyChanged({ get_weak(), &ColorSchemeViewModel::_ColorEntryChangedHandler });
        _CursorColor.PropertyChanged({ get_weak(), &ColorSchemeViewModel::_ColorEntryChangedHandler });
        _SelectionBackgroundColor.PropertyChanged({ get_weak(), &ColorSchemeViewModel::_ColorEntryChangedHandler });
    }

    winrt::hstring ColorSchemeViewModel::Name()
    {
        return _Name;
    }

    bool ColorSchemeViewModel::IsDefaultScheme()
    {
        const auto defaultAppearance = _settings.ProfileDefaults().DefaultAppearance();
        return defaultAppearance.LightColorSchemeName() == defaultAppearance.DarkColorSchemeName() &&
               _Name == defaultAppearance.LightColorSchemeName();
    }

    void ColorSchemeViewModel::RefreshIsDefault()
    {
        _NotifyChanges(L"IsDefaultScheme");
    }

    bool ColorSchemeViewModel::RequestRename(winrt::hstring newName)
    {
        if (const auto parentPageVM{ _parentPageVM.get() })
        {
            return parentPageVM.RequestRenameCurrentScheme(newName);
        }
        return false;
    }

    void ColorSchemeViewModel::Name(winrt::hstring newName)
    {
        _scheme.Name(newName);
        _Name = newName;
    }

    void ColorSchemeViewModel::_ColorEntryChangedHandler(const IInspectable& sender, const PropertyChangedEventArgs& args)