package com.ms_square.debugoverlay.modules;

import android.graphics.Color;
import android.support.annotation.ColorInt;
import android.support.annotation.NonNull;

public interface LogcatLineColorScheme {

    @ColorInt
    int getTextColor(LogcatLine.Priority priority, @NonNull String tag);

    /**
     * Ref...https://material.io/guidelines/style/color.html#color-color-palette
     */
    LogcatLineColorScheme DEFAULT_COLOR_SCHEME = new LogcatLineColorScheme() {

        private final int MATERIAL_BLUE = Color.parseColor("#1E88E5");

        private final int MATERIAL_GREEN = Color.parseColor("#43A047");

        private final int MATERIAL_YELLOW = Color.parseColor("#FDD835");

        private final int MATERIAL_RED = Color.parseColor("#E53935");

        @Override
        public int getTextColor(LogcatLine.Priority priority, String tag) {
            switch (priority) {
                case VERBOSE: {
                    return Color.BLACK;
                }
                case DEBUG: {
                    return MATERIAL_BLUE;
                }
                case INFO: {
                    return MATERIAL_GREEN;
                }
                case WARNING: {
                    return MATERIAL_YELLOW;
                }
                case ERROR:
                case FATAL:
                case ASSERT:
                case SILENT: {
                    return MATERIAL_RED;
                }
                default: {
                    return Color.BLACK;
                }
            }
        }
    };
}

@@ -295,469 +295,82 @@
     
-/**%0A     * Ref...https://material.io/guidelines/style/color.html#color-color-palette%0A     */%0A    LogcatLineColorScheme DEFAULT_COLOR_SCHEME = new LogcatLineColorScheme() %7B%0A%0A        private final int MATERIAL_BLUE = Color.parseColor(%22#1E88E5%22);%0A%0A        private final int MATERIAL_GREEN = Color.parseColor(%22#43A047%22);%0A%0A        private final int MATERIAL_YELLOW = Color.parseColor(%22#FDD835%22);%0A%0A        private final int MATERIAL_RED = Color.parseColor(%22#E53935%22);
+LogcatLineColorScheme DEFAULT_COLOR_SCHEME = new LogcatLineColorScheme() %7B
 %0A%0A  
@@ -640,25 +640,22 @@
  return 
-MATERIAL_
+Color.
 BLUE;%0A  
@@ -726,25 +726,22 @@
  return 
-MATERIAL_
+Color.
 GREEN;%0A 
@@ -816,25 +816,22 @@
  return 
-MATERIAL_
+Color.
 YELLOW;%0A
@@ -936,37 +936,8 @@
 ERT:
-%0A                case SILENT:
  %7B%0A 
@@ -966,17 +966,14 @@
 urn 
-MATERIAL_
+Color.
 RED;
@@ -1043,37 +1043,37 @@
    return Color.
-BLACK
+WHITE
 ;%0A              

update default logcat color scheme