As with the foreground case, this if statement should be moved into colorForCode:alternateSemantics:bold:isBackground: changing alternateSemantics: to colorMode:.