package hr.fer.labust.diverapp.common;

import android.graphics.Color;

public class Colors {
    private static int mIndex = 0;
    private static int mIndex2 = 0;

    private static int[] mColors = {
            Color.parseColor("#00ff00"),
            Color.parseColor("#ff0000"),
            Color.parseColor("#0000ff"),
            Color.parseColor("#00ffff"),
            Color.parseColor("#ff00ff"),
            Color.parseColor("#ffff00"),
            Color.parseColor("#ffff40"),
            Color.parseColor("#40ffff"),
            Color.parseColor("#c0ff00"),
            Color.parseColor("#40ffc0"),
            Color.parseColor("#80ff00"),
            Color.parseColor("#ffc040"),
            Color.parseColor("#ff4000"),
            Color.parseColor("#c000ff"),
            Color.parseColor("#ffff00"),
            Color.parseColor("#8000ff"),
            Color.parseColor("#80c000"),
            Color.parseColor("#ffff00"),
            Color.parseColor("#c04040"),
            Color.parseColor("#ffff00"),
            Color.parseColor("#c04000"),
            Color.parseColor("#8000c0"),
            Color.parseColor("#ffff00"),
            Color.parseColor("#808000"),
            Color.parseColor("#ffff00"),
            Color.parseColor("#400040")
    };

    public static int getColor() {
        int index = mIndex;
        mIndex = (mIndex + 1) % mColors.length;

        return mColors[index];
    }

    public static int getColor2() {
        int index = mIndex2;
        mIndex2 = (mIndex2 + 1) % mColors.length;

        return mColors[index];
    }

    public static void reset() {
        mIndex = 0;
        mIndex2 = 0;
    }
}
