String (@NotNull String scopeName, Project project) { FileColorConfiguration configuration = null; Iterator<FileColorConfiguration> iterator = getConfigurations(); while (iterator.hasNext()) { var each = iterator.next(); if (scopeName.equals(each.getScopeName())) { configuration = each; break; } } if (configuration != null && configuration.isValid(project)) { return configuration.getColorID(); } return null; }