package com.negusoft.holoaccent;

import android.graphics.Color;

public class AccentPalette {
	
	public final int accentColor;
	public final int red;
	public final int green;
	public final int blue;
	
	public AccentPalette(int color) {
		accentColor = color;
		red = Color.red(color);
		green = Color.green(color);
		blue = Color.blue(color);
	}
	
	public AccentPalette(int r, int g, int b) {
		accentColor = Color.rgb(r, g, b);
		red = r;
		green = g;
		blue = b;
	}
	
	public int getTranslucent(int alpha) {
		return Color.argb(alpha, red, green, blue);
	}

}

@@ -90,16 +90,78 @@
 tte %7B%0A%09%0A
+%09private static final float DARK_ACCENT_PERCENTAGE = 0.85f;%0A%09%0A
 %09public 
@@ -183,16 +183,16 @@
 tColor;%0A
-
 %09public 
@@ -296,31 +296,8 @@
 ) %7B%0A
-%09%09accentColor = color;%0A
 %09%09re
@@ -376,16 +376,61 @@
 color);%0A
+%09%09accentColor = Color.rgb(red, green, blue);%0A
 %09%7D%0A%09%0A%09pu
@@ -584,24 +584,24 @@
 nt alpha) %7B%0A
-
 %09%09return Col
@@ -636,12 +636,316 @@
 lue);%0A%09%7D
+%0A%09%0A%09public int getDarkAccentColor() %7B%0A%09%09return getDarkAccentColor(255);%0A%09%7D%0A%09%0A%09public int getDarkAccentColor(int alpha) %7B%0A%09%09int r = (int)(red * DARK_ACCENT_PERCENTAGE);%0A%09%09int g = (int)(green * DARK_ACCENT_PERCENTAGE);%0A%09%09int b = (int)(blue * DARK_ACCENT_PERCENTAGE);%0A%09%09return Color.argb(alpha, r, g, b);%0A%09%7D
 %0A%0A%7D%0A

Add dark accent color to AccentPalette