View Raw Source
 // Tweak.xm

#import "SparkColourPickerUtils.h"

%hook Class
- (void)setSomethingsColor:(UIColor *)arg1 {
        NSMutableDictionary *colorDictionary = [NSMutableDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.your.tweak.colors.plist"];
        arg1 = [SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"customColorKey"] withFallback:@"#29B6F6"];
        %orig;
}
%end




// Makefile

Tweak_LIBRARIES = sparkcolourpicker


// Prefs' plist file

<dict>
                        <key>cell</key>
                        <string>PSLinkCell</string>
                        <key>cellClass</key>
                        <string>SparkColourPickerCell</string>
                        <key>libsparkcolourpicker</key>
                        <dict>
                                <key>defaults</key>
                                <string>com.your.tweak.colors</string>
                                <key>fallback</key>
                                <string>#29B6F6</string>
                                <key>alpha</key>
                                <true/>
                                <key>PreviewGradient</key>
                <false/>
                                <key>PreviewStyle</key>
                <integer>1</integer>
                        </dict>
                        <key>label</key>
                        <string>Tint Color</string>
                        <key>key</key>
                        <string>customColorKey</string>
                </dict>