예제 #1
0
    public @Nullable MaterialColor getByColor(Context context, int colorValue) {
      for (MaterialColor color : colors) {
        if (color.represents(context, colorValue)) {
          return color;
        }
      }

      return null;
    }
예제 #2
0
    public int[] asConversationColorArray(@NonNull Context context) {
      int[] results = new int[colors.size()];
      int index = 0;

      for (MaterialColor color : colors) {
        results[index++] = color.toConversationColor(context);
      }

      return results;
    }
예제 #3
0
 public SgnColor(MaterialColor color) {
   this.mColor = color.getValue();
 }