apearson / goodlock-hex2color

An automated Goodlock color picker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reddit Discussion

apearson opened this issue · comments

No luck on my Mac so far; will try Windows after a meeting.

First, tried without ADB in my $PATH:

❯ python hex2goodlock.py '#253f3f'
Input Hex: #253f3f
Hue Screen Location: 924.0px
Saturation Screen Location: 249.0px
Value Screen Location: 1390.0px
./mac-tools/adb shell input tap 850 924.0 && adb shell input tap 249.0 1390.0
sh: adb: command not found

❯ which adb
adb not found

No dice there. With ADB installed:

❯ brew install android-platform-tools

❯ which adb
/usr/local/bin/adb

❯ adb devices
List of devices attached
24923391    device

❯ python hex2goodlock.py '#253f3f'
Input Hex: #253f3f
Hue Screen Location: 924.0px
Saturation Screen Location: 249.0px
Value Screen Location: 1390.0px
adb shell input tap 850 924.0 && adb shell input tap 249.0 1390.0

USB debugging was for-sure enabled, GoodLock was on the color selector with the 4 hexagons. brew install android-platform-tools is a nice way for Mac users to get their adb and fastboot, if they already have homebrew installed... but if they do, they probably don't need much walkthrough anyways.

I'll keep you posted!

...and on Windows:

python -V

Python 3.5.2

which adb

/cygdrive/c/Windows/adb

python hex2goodlock.py '#253f3f'

Input Hex: '#253f3f'

Traceback (most recent call last):

File "hex2goodlock.py", line 22, in

rgb = int(inputHex[1:3],16), int(inputHex[3:5], 16), int(inputHex[5:7], 16))

ValueError: invalid literal for int() with base 16: '#2'

Changing the command to python hex2goodlock.py "#253f3f" on Windows 10 stopped the int() error.

I was able to see the color in the Base Color scroll! However, it didn't select the correct color for the hex code, and an arbitrary hex code (#14cedb) didn't result in any scroll whatsoever. Both the color codes #253f3f and #253237 would scroll the base color over by 1 hexagon to the left for me.

@blindingstars Are you using condensed mode or standard display mode

Standard display mode, AT&T S7

Alright, the screen locations are different on the standard display mode. I'm working on getting the coordinates now.

@blindingstars Standard display mode should be working now. Let me know how it works for you.

@AndrewPE Still no luck on Windows:

Screen recording

Always goes one hex to the left (using one of your provided colors) or doesn't move at all (using #14cedb as an example). Perhaps it has to do with the starting color? Mine is a very dark charcoal grey; was yours something more colorful?

Off topic but how did you make that video? That's pretty neat

I see the problem, I have the latest update that contains the custom color picker.
screenshot_20161004-231943

Ah! That might do it; thought my Good Lock was up to date. I feel awfully silly now; I'll go update that and give this another go.

I used Rec to record and converted to a GIF at ezgif.

Aaaand working! 💥 Safe to close here.

Since I've got everything set up, want me to make a recording of the process so that others have a visual? I'd definitely mention that Good Lock should have the Custom option and perhaps even have a screenshot there, if no video.

Awesome! Want me to add you to the ReadMe's beta testers and to the contributors file?

If you don't mind doing that, it would make showing everyone else much much easier!

Sure, and no trouble at all! Let me just decide on my colors and I'll get that recording added.

Noticing a slight shift here:

image

Should be #000000, but shows up as #070707


image

Should be #464646, but shows up as #44423d

I'll still record away, as the process is the same, but maybe slight misalignment on Standard display mode?

You might be right, I'm going to open another issue for this.