void setColorProfile(ColorProfile profile) {
    if (profile.getWhitespaceColor() != null) {
      whitespaceColor = profile.getWhitespaceColor();
    }
    if (profile.getLineHighlightColor() != null) {
      lineHighlightColor = profile.getLineHighlightColor();
    }
    if (profile.getMatchingCharColor() != null) {
      matchingCharColor = profile.getMatchingCharColor();
    }
    if (profile.getNoMatchingCharColor() != null) {
      noMatchingCharColor = profile.getNoMatchingCharColor();
    }
    if (profile.getBackgroundColor() != null) {
      backgroundColor = profile.getBackgroundColor();
    }
    if (profile.getDefaultFontColor() != null) {
      defaultFontColor = profile.getDefaultFontColor();
    }
  }