I've been looking for a way to adjust a global "accent color" that I've created with KLWP and KWGT.
I couldn't find anything... So, I found a way to do it myself.
This is for those who are familiar with Tasker and KLWP...
There may also be a better way to do this.
Step 1 Create Tasks
You'll need to create 8 separate tasks
All Capitol letters are important!
1. Accent
2. Color
3. Red
4. Redhex
5. Green
6. Greenhex
7. Blue
8. Bluehex
--
1. Accent
-
1- Show Scene
Name: Accent Picker
Display As: Display, Full Display, No Bar
Animation: System
Continue Task Immediately: ✓
2- Variable Set
Name: %Accent
To: %0
2. Color
-
1- Variable Set
Name: %Color
To: %Redhex%Greenhex%Bluehex
3-8 Red, Redhex, Green, Greenhex, Blue & Bluehex
-
1- Variable Set
Name: %Red Repeat for all other tasks using the tasks name.
To: 16 Anything but 1-15
Step 2 Create A Profile
You'll need to create 1 Profile
1. Color
-
1- Event • Variable Set
Variable:%Color
Value:%Color
Step 3 Create A Scene
I called my scene Accent Picker.
You can design your scene the way you want but you will need the following elements for this tutorial.
You'll need 5 separate elements.
1. Red | Slider Element
2. Green | Slider Element
3. Blue | Slider Element
4. Finish Button | Text Element
5. Preview Box | Rectangle Element
Purpose:
You'll be using each slider element to create a value for each channel R G B
You'll be using the "Finish Button" to destroy the scene when you are done and to broadcast the new variable to KLWP or KWGT.
You'll be using the "Preview Box" to view the color you create with your slider.
1-3. Red | Slider Element *Repeat the steps below for Green and Blue*
UI
Name: Red
Min: 16
Max: 255
Default: %Red
Value Selected
1 - Variable Set
Name: Red
To: %new_val
2- Array Process
Variable: %Color
Type: Remove Duplicates
3- Variable Convert
Name: %new_val
Function: Decimal to Hex
Store Result In: %Redhex
4- Variable Set
Name: %Accent
To: %Color
5- Array Process
Variable: %Color
Type: Remove Duplicate
Min: 16
Max: 255
Default: %Red
4. Finish Button
UI you can dress this up however
Name: Done
Tap
1- Variable Set
Name: %Accent
To: %Color
2- KLWP Send Variable
Configuration: Tasker String - %Accent | Kustom Variable - accent
3- Destroy Scene
Name: Accent Picker
5. Preview Box
UI
Geometry: However you want
Colour: %Color
Step 4 Create KLWP Touch Action & Formula
You can now create a touch action in KLWP
Touch
Single: Launch Shortcut
Shortcut: Task Shortcut : Accent
You can call in the new Hex code value with the Formula Editor string
Formula
$br(tasker, accent)$
Thanks!
---
I'm currently working on a KLWP called "Nokose" which is the Muscogee word for Bear.
I'm a previous owner of multiple Windows Phones. I miss the dark theme option and having control over the accent color of my phone.
I couldn't find anything... So, I found a way to do it myself.
This is for those who are familiar with Tasker and KLWP...
There may also be a better way to do this.
Step 1 Create Tasks
You'll need to create 8 separate tasks
All Capitol letters are important!
1. Accent
2. Color
3. Red
4. Redhex
5. Green
6. Greenhex
7. Blue
8. Bluehex
--
1. Accent
-
1- Show Scene
Name: Accent Picker
Display As: Display, Full Display, No Bar
Animation: System
Continue Task Immediately: ✓
2- Variable Set
Name: %Accent
To: %0
2. Color
-
1- Variable Set
Name: %Color
To: %Redhex%Greenhex%Bluehex
3-8 Red, Redhex, Green, Greenhex, Blue & Bluehex
-
1- Variable Set
Name: %Red Repeat for all other tasks using the tasks name.
To: 16 Anything but 1-15
Step 2 Create A Profile
You'll need to create 1 Profile
1. Color
-
1- Event • Variable Set
Variable:%Color
Value:%Color
Step 3 Create A Scene
I called my scene Accent Picker.
You can design your scene the way you want but you will need the following elements for this tutorial.
You'll need 5 separate elements.
1. Red | Slider Element
2. Green | Slider Element
3. Blue | Slider Element
4. Finish Button | Text Element
5. Preview Box | Rectangle Element
Purpose:
You'll be using each slider element to create a value for each channel R G B
You'll be using the "Finish Button" to destroy the scene when you are done and to broadcast the new variable to KLWP or KWGT.
You'll be using the "Preview Box" to view the color you create with your slider.
1-3. Red | Slider Element *Repeat the steps below for Green and Blue*
UI
Name: Red
Min: 16
Max: 255
Default: %Red
Value Selected
1 - Variable Set
Name: Red
To: %new_val
2- Array Process
Variable: %Color
Type: Remove Duplicates
3- Variable Convert
Name: %new_val
Function: Decimal to Hex
Store Result In: %Redhex
4- Variable Set
Name: %Accent
To: %Color
5- Array Process
Variable: %Color
Type: Remove Duplicate
Min: 16
Max: 255
Default: %Red
4. Finish Button
UI you can dress this up however
Name: Done
Tap
1- Variable Set
Name: %Accent
To: %Color
2- KLWP Send Variable
Configuration: Tasker String - %Accent | Kustom Variable - accent
3- Destroy Scene
Name: Accent Picker
5. Preview Box
UI
Geometry: However you want
Colour: %Color
Step 4 Create KLWP Touch Action & Formula
You can now create a touch action in KLWP
Touch
Single: Launch Shortcut
Shortcut: Task Shortcut : Accent
You can call in the new Hex code value with the Formula Editor string
Formula
$br(tasker, accent)$
Thanks!
---
I'm currently working on a KLWP called "Nokose" which is the Muscogee word for Bear.
I'm a previous owner of multiple Windows Phones. I miss the dark theme option and having control over the accent color of my phone.
from xda-developers http://ift.tt/24caTwQ
via IFTTT
No comments:
Post a Comment