code: def colors(self, color_code):
          
          if color_code is None:
              color_code = WINDOWS_CODES['/all']
  
          # Get current color code.
          current_fg, current_bg = self.colors
  
          # Handle special negative codes. Also determine the final color code.
          if color_code == WINDOWS_CODES['/fg']:
              final_color_code = self.default_fg | current_bg  # Reset the foreground only.
          elif color_code == WINDOWS_CODES['/bg']:
              final_color_code = current_fg | self.default_bg  # Reset the background only.
          elif color_code == WINDOWS_CODES['/all']:
              final_color_code = self.default_fg | self.default_bg  # Reset both.
          elif color_code == WINDOWS_CODES['bgblack']:
              final_color_code = current_fg  # Black background.
          else:
              new_is_bg = color_code in self.ALL_BG_CODES
              final_color_code = color_code | (current_fg if new_is_bg else current_bg)
  
          # Set new code.
          self._kernel32.SetConsoleTextAttribute(self._stream_handle, final_color_code)
docs: Change the foreground and background colors for subsequently printed characters.
  
          None resets colors to their original values (when class was instantiated).
  
          Since setting a color requires including both foreground and background codes (merged), setting just the
          foreground color resets the background color to black, and vice versa.
  
          This function first gets the current background and foreground colors, merges in the requested color code, and
          sets the result.
  
          However if we need to remove just the foreground color but leave the background color the same (or vice versa)
          such as when {/red} is used, we must merge the default foreground color with the current background color. This
          is the reason for those negative values.
  
          :param int color_code: Color code from WINDOWS_CODES.