Repository: microsoft/terminal
File: src/cascadia/TerminalCore/Terminal.cpp (C++)

Code before:
        }
    }
}

// Method Description:
// - Update our internal properties to match the new values in the provided
//   CoreAppearance object.
// Arguments:
// - appearance: an ICoreAppearance with new settings values for us to use.
void Terminal::UpdateAppearance(const ICoreAppearance& appearance)
{
    // Set the default background as transparent to prevent the
    // DX layer from overwriting the background image or acrylic effect
    til::color newBackgroundColor{ appearance.DefaultBackground() };
    _defaultBg = newBackgroundColor.with_alpha(0);
    _defaultFg = appearance.DefaultForeground();
    _intenseIsBright = appearance.IntenseIsBright();
    _perceptualColorNudging = appearance.PerceptualColorNudging();

    for (int i = 0; i < 16; i++)
    {
        _colorTable.at(i) = til::color{ appearance.GetColorTableEntry(i) };
    }
    if (_perceptualColorNudging)
    {
        _MakeAdjustedColorArray();
    }

    CursorType cursorShape = CursorType::VerticalBar;
    switch (appearance.CursorShape())
    {
    case CursorStyle::Underscore:
        cursorShape = CursorType::Underscore;
        break;
    case CursorStyle::FilledBox:
        cursorShape = CursorType::FullBox;
        break;
    case CursorStyle::EmptyBox:
        cursorShape = CursorType::EmptyBox;
        break;
    case CursorStyle::Vintage:
        cursorShape = CursorType::Legacy;
        break;
    case CursorStyle::DoubleUnderscore:
        cursorShape = CursorType::DoubleUnderscore;
        break;
    default:
    case CursorStyle::Bar:
        cursorShape = CursorType::VerticalBar;
        break;
    }

Review comment (suggestion):
might need to do an 
`else 
{
    _adjustedColorArray.clear()
}`
to ensure it doesn't persist across settings reloads

Code after:
    }
}

// Method Description:
// - Update our internal properties to match the new values in the provided
//   CoreAppearance object.
// Arguments:
// - appearance: an ICoreAppearance with new settings values for us to use.
void Terminal::UpdateAppearance(const ICoreAppearance& appearance)
{
    // Set the default background as transparent to prevent the
    // DX layer from overwriting the background image or acrylic effect
    til::color newBackgroundColor{ appearance.DefaultBackground() };
    _defaultBg = newBackgroundColor.with_alpha(0);
    _defaultFg = appearance.DefaultForeground();
    _intenseIsBright = appearance.IntenseIsBright();
    _adjustIndistinguishableColors = appearance.AdjustIndistinguishableColors();

    for (int i = 0; i < 16; i++)
    {
        _colorTable.at(i) = til::color{ appearance.GetColorTableEntry(i) };
    }
    if (_adjustIndistinguishableColors)
    {
        _MakeAdjustedColorArray();
    }

    CursorType cursorShape = CursorType::VerticalBar;
    switch (appearance.CursorShape())
    {
    case CursorStyle::Underscore:
        cursorShape = CursorType::Underscore;
        break;
    case CursorStyle::FilledBox:
        cursorShape = CursorType::FullBox;
        break;
    case CursorStyle::EmptyBox:
        cursorShape = CursorType::EmptyBox;
        break;
    case CursorStyle::Vintage:
        cursorShape = CursorType::Legacy;
        break;
    case CursorStyle::DoubleUnderscore:
        cursorShape = CursorType::DoubleUnderscore;
        break;
    default:
    case CursorStyle::Bar:
        cursorShape = CursorType::VerticalBar;
        break;
    }