Colorwheel

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

package com.example.loqo.

myfirstapps;

import android.graphics.Color;

import java.util.Random;

/**
* Created by loqo on 6/12/2017.
*/

public class ColorWheel {

public String[] mcolors = {


"#fdf5e6",
"#001935",
"#c39797",
"#c1ffc1",
"#1c4f69",
"#caff70",
"#ce3bf9",
"#111111",
"#ffffff"
};

public int getColors(){


String colors = "0";

//Random class
Random randomGenerator = new Random();
int randomNumber = randomGenerator.nextInt(mcolors.length);
colors = mcolors[randomNumber];
int colorsAsInt = Color.parseColor(colors);
return colorsAsInt;
}
}

You might also like