[Xposed Framework Modules] GermainZ:
It would be great if we could configure the light/dark icon tints (when colors are automatically detected). I gave it a try but couldn't test because my compiled app (even a clean one) can't be loaded by Xposed and I don't know why (I'll try to solve it when I get some free time, but I still think it'd be great to include it in the next version if that's released before I can solve it).

Also, I'm not submitting directly to github because 1- How I did it may not actually work, 2- If it does, the way I did it may be horrible. :D

(spacing got messed up a little bit, sorry about that)

res/values/strings.xml

[COLOR="Cyan"]@@ -31,6 +31,8 @@[/COLOR]
<string name="default_status_bar_icon_tint_title">Default status bar icon tint color</string>
<string name="default_navigation_bar_tint_title">Default navigation bar tint color</string>
<string name="default_navigation_bar_icon_tint_title">Default navigation bar tint color</string>
[COLOR="Green"]+ <string name="light_status_bar_icon_tint_title">Light status bar icon tint color (used when colors are detected automatically)</string>
+ <string name="dark_status_bar_icon_tint_title">Dark status bar icon tint color (used when colors are detected automatically)</string>[/COLOR]
<string name="default_summary">Select the default color if no color can be determined</string>
<string name="max_hsv_title">Max HS[V] for black icons</string>
<string name="max_hsv_summary">Maximum HS[V] before auto-switching to black icons</string>

res/xml/pref_general.xml

[COLOR="Cyan"]@@ -24,6 +24,14 @@[/COLOR]
android:key="pref_default_nav_bar_tint"
android:summary="@string/default_summary"
android:title="@string/default_navigation_bar_tint_title" />
[COLOR="Green"]+ <com.mohammadag.colouredstatusbar.ColorPreference
+ android:key="pref_light_status_bar_icon_tint"
+ android:summary="@string/default_summary"
+ android:title="@string/light_status_bar_icon_tint_title" />
+ <com.mohammadag.colouredstatusbar.ColorPreference
+ android:key="pref_dark_status_bar_icon_tint"
+ android:summary="@string/default_summary"
+ android:title="@string/dark_status_bar_icon_tint_title" />[/COLOR]

src/com/mohammadag/colouredstatusbar/ColorPreference.java

[COLOR="Cyan"]@@ -75,8 +75,12 @@[/COLOR] public class ColorPreference extends Preference implements Preference.OnPreferen
tintType = SettingsHelper.Tint.NAV_BAR;
else if (getKey().equals(Common.SETTINGS_KEY_DEFAULT_STATUS_BAR_ICON_TINT))
tintType = SettingsHelper.Tint.ICON;
else if (getKey().equals(Common.SETTINGS_KEY_DEFAULT_STATUS_BAR_TINT))
tintType = SettingsHelper.Tint.STATUS_BAR;
[COLOR="Green"]+ else if (getKey().equals(Common.SETTINGS_KEY_LIGHT_STATUS_BAR_ICON_TINT))
+ tintType = SettingsHelper.Tint.ICON_LIGHT;
+ else if (getKey().equals(Common.SETTINGS_KEY_DARK_STATUS_BAR_ICON_TINT))
+ tintType = SettingsHelper.Tint.ICON_DARK;[/COLOR]

src/com/mohammadag/colouredstatusbar/Common.java

[COLOR="Cyan"]@@ -30,6 +30,8 @@[/COLOR] public class Common {
public static final String SETTINGS_KEY_DEFAULT_STATUS_BAR_TINT = "pref_default_status_bar_tint";
public static final String SETTINGS_KEY_DEFAULT_STATUS_BAR_ICON_TINT = "pref_default_status_bar_icon_tint";
public static final String SETTINGS_KEY_DEFAULT_NAV_BAR_TINT = "pref_default_nav_bar_tint";
[COLOR="Green"]+ public static final String SETTINGS_KEY_LIGHT_STATUS_BAR_ICON_TINT = "pref_light_status_bar_icon_tint";
+ public static final String SETTINGS_KEY_DARK_STATUS_BAR_ICON_TINT = "pref_dark_status_bar_icon_tint";[/COLOR]

src/com/mohammadag/colouredstatusbar/SettingsActivity.java

[COLOR="Cyan"]@@ -66,7 +66,9 @@[/COLOR] public class SettingsActivity extends PreferenceActivity {
String[] colorKeys = {
Common.SETTINGS_KEY_DEFAULT_STATUS_BAR_TINT,
Common.SETTINGS_KEY_DEFAULT_STATUS_BAR_ICON_TINT,
[COLOR="Green"]+ Common.SETTINGS_KEY_LIGHT_STATUS_BAR_ICON_TINT,
+ Common.SETTINGS_KEY_DARK_STATUS_BAR_ICON_TINT[/COLOR]
};

src/com/mohammadag/colouredstatusbar/SettingsHelper.java

[COLOR="Cyan"]@@ -17,7 +17,7 @@[/COLOR] public class SettingsHelper {
private static final boolean DEBUG = true;

/* TODO: Rework this class to use this enum for more consistent code */
[COLOR="Red"]- public enum Tint { STATUS_BAR, ICON, NAV_BAR };[/COLOR]
[COLOR="Green"]+ public enum Tint { STATUS_BAR, ICON, ICON_LIGHT, ICON_DARK, NAV_BAR };[/COLOR]

// To be used from within module class.
public SettingsHelper(XSharedPreferences prefs) {
[COLOR="Cyan"]@@ -244,6 +244,10 @@[/COLOR] public class SettingsHelper {
return getColorForKey(Common.SETTINGS_KEY_DEFAULT_NAV_BAR_TINT, Common.COLOR_BLACK, withHash);
case ICON:
return getColorForKey(Common.SETTINGS_KEY_DEFAULT_STATUS_BAR_ICON_TINT, Common.COLOR_WHITE, withHash);
[COLOR="Green"]+ case ICON_LIGHT:
+ return getColorForKey(Common.SETTINGS_KEY_LIGHT_STATUS_BAR_ICON_TINT, Common.COLOR_WHITE, withHash);
+ case ICON_DARK:
+ return getColorForKey(Common.SETTINGS_KEY_DARK_STATUS_BAR_ICON_TINT, Common.COLOR_BLACK, withHash);[/COLOR]
}

return Common.COLOR_BLACK;
[COLOR="Cyan"]@@ -257,6 +261,10 @@[/COLOR] public class SettingsHelper {
return getColorForKey(Common.SETTINGS_KEY_DEFAULT_NAV_BAR_TINT, Color.BLACK);
case ICON:
return getColorForKey(Common.SETTINGS_KEY_DEFAULT_STATUS_BAR_ICON_TINT, Color.WHITE);
[COLOR="Green"]+ case ICON_LIGHT:
+ return getColorForKey(Common.SETTINGS_KEY_LIGHT_STATUS_BAR_ICON_TINT, Color.WHITE);
+ case ICON_DARK:
+ return getColorForKey(Common.SETTINGS_KEY_DARK_STATUS_BAR_ICON_TINT, Color.BLACK);[/COLOR]
}

src/com/mohammadag/colouredstatusbar/Utils.java (oh look, my name's in here!!)

[COLOR="Cyan"]@@ -66,13 +68,16 @@[/COLOR] public class Utils {
// Thanks to GermainZ for the suggestion
// http://xdaforums.com/showpost.php?p=46102053&postcount=153
public static int getIconColorForColor(int color, float hsvMaxValue) {
[COLOR="Green"]+ mSettingsHelper = new SettingsHelper(new XSharedPreferences(Common.PACKAGE_NAME, Common.PREFS));[/COLOR]
float[] hsv = new float[3];
Color.colorToHSV(color, hsv);
float value = hsv[2];
if (value > hsvMaxValue) {
[COLOR="Red"]- return Color.BLACK;[/COLOR]
[COLOR="Green"]+ return mSettingsHelper.getDefaultTint(SettingsHelper.Tint.ICON_DARK);[/COLOR]
} else {
[COLOR="Red"]- return Color.WHITE;[/COLOR]
[COLOR="Green"]+ return mSettingsHelper.getDefaultTint(SettingsHelper.Tint.ICON_LIGHT);[/COLOR]
}
}

Thanks!