It is currently June 24th, 2024, 1:20 am

Help With Chameleon Plugin

Share and get help with Plugins and Addons
DePixeled
Posts: 5
Joined: March 3rd, 2024, 1:42 pm

Help With Chameleon Plugin

Post by DePixeled »

So basically I've been a fan of Google material you since the release of Android 12 and I've been trying to replicate it's look using colours extracted by the Chameleon Plugin, in however not getting the desired look. If any solution, please help.

P.S. Btw I know that material you has around 60 shades extracted, but I wouldn't mind just 10
RicardoTM
Posts: 292
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Help With Chameleon Plugin

Post by RicardoTM »

If you shared the skin you're working on or at least more info there would be more chances that you get help.
User avatar
Yincognito
Rainmeter Sage
Posts: 7492
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Help With Chameleon Plugin

Post by Yincognito »

DePixeled wrote: March 3rd, 2024, 1:47 pm So basically I've been a fan of Google material you since the release of Android 12 and I've been trying to replicate it's look using colours extracted by the Chameleon Plugin, in however not getting the desired look. If any solution, please help.

P.S. Btw I know that material you has around 60 shades extracted, but I wouldn't mind just 10
The Chameleon plugin only gets some color from your background / wallpaper that you can then use in your skin. If there are differences between the extracted color(s) and what you want to replicate from the material design, then the result won't be the same.

I imagine the material design is not just about plain RGBA colors, but dynamically using modified versions of the background color (e.g. less saturated, light and dark theme "complementary" colors, maybe some transparency as well, etc.), like briefly described here:
https://m3.material.io/styles/color/system/how-the-system-works

Obviously, the exact transformation formulas from the background color to the one used by the material design is probably not that straightforward, or at least is requiring some additional information, so, unless you find a source explaining the transformation, you can only guess the math behind it. In any case, it's clear that you need to find how to "convert" the color you get from Chameleon to one that closely resembles what the material design is using in the exact same circumstances.

I suspect it would require quite a bit of trial and error and comparing the result with the expected one to understand the principles. Once you do, using one or more Calc measures to do the conversion math would probably get what you want, ready to be applied in your skin. This is up to you to research or discover.

Or, you could check the related Reddit threads about it, like the one here and ask the author of that post, if he'll ever respond:
https://forum.rainmeter.net/viewtopic.php?t=42661

Alternatively, you could try and see if such a mathematical approach / plugin for Rainmeter exists and does what you want, see these:
https://github.com/topics/material-you?l=c%23&o=asc&s=stars
https://github.com/Reallukeisbest/meterial-you
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
RicardoTM
Posts: 292
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Help With Chameleon Plugin

Post by RicardoTM »

It should not be that difficult to create a lua script that returns shades of the color given by the Chamaleon plugin. A Color scheme should be created first to determine how many shades/tones you require (more info). Then assign each color to a variable and then assign those variables to each element on your skin to make it dynamic.

These variables would go according to each shade/tone as it's described on the site Yin cited.

Anyway, that material you plugin is worth a try, I'll definitely give it a look.
User avatar
balala
Rainmeter Sage
Posts: 16325
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help With Chameleon Plugin

Post by balala »

DePixeled wrote: March 3rd, 2024, 1:47 pm If any solution, please help.
Along with RicardoTM and Yincognito, I think there is no solution, because you don't help us to help you. What skin, what code are you using? Take into account this, because otherwise we can't really help (to be honest, when seeing this kind of post, which doesn't even tell us what and how are you doing, I personally don't even want - sorry, but this is the truth). So help us, to at least can see what are you trying to achieve.
Sorry if this sounded little bit rude, was not my intention to hurt you, but please help us to help you when you ask for help.
User avatar
Yincognito
Rainmeter Sage
Posts: 7492
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Help With Chameleon Plugin

Post by Yincognito »

Yeah, I think what all of us already replying (RicardoTM, balala and me) are trying to convey is that without a specific "subject" you're working on (aka some skin, code, along with a precise description of what you'd like to achieve, maybe one or two examples), all you're going to get is some generalities about how it could be approached, which can obviously help in getting an idea about it, but won't help that much when it comes to the implementation - especially if other particularities specific to that skin are involved.

Personally, I'm typically not opposed to answering such questions since, after all, laying out some principles and search results is usually easier than writing (or debugging) a code implementing them, but, hey, it's your interest at stake here, so you reap what you sow, so to speak - the better you describe a problem, the more comprehensive a solution usually is. :confused:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
DePixeled
Posts: 5
Joined: March 3rd, 2024, 1:42 pm

Re: Help With Chameleon Plugin

Post by DePixeled »

I'm really sorry I'd completely forgotten about this post (too busy with my studies) I'm thankful for your help and I'll post the code in a short while but to give some understanding, I simply want shapes to have the material you-ish color and then I'll build on top of that.

I've tried the Meterial You plugin but it doesn't detect the wallpaper colours but rather has a fixed set of values.

And if anybody could help with showing me how to create the lua file I'd be very grateful.

Anyhow I'm sorry for any inconveniences caused 😞
DePixeled
Posts: 5
Joined: March 3rd, 2024, 1:42 pm

Re: Help With Chameleon Plugin

Post by DePixeled »

So here's an image and the plugin seems to work work fine when theres ine primary color like the purple here, but goes wonky when it has multiple colors and cant decide on one.

Here's a link to it: https://imgur.com/a/b1ddxfG

Here's also the code (but only for the background shapes)

Code: Select all

[Rainmeter]
Update=1000
SkinHeight=600\
OnRefreshAction=[!SetWindowPosition "50%" "57.5%" "50%" "50%"]
AccurateText=1

[Metadata]
Name=
Author=
Information=
Version=
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0

[Variables]
@include=#@#Styles.inc

[1]
Meter=Shape
Shape=Rectangle 0,530,700,70,35 | FillColor [Light1] | StrokeWidth=0
DynamicVariables=1

[2]
Meter=Shape
Shape=Rectangle 720,530,180,70,35 | FillColor [Light1] | StrokeWidth=0
Shape2=Rectangle 830,530,70,70,15 | FillColor [Light1] | StrokeWidth=0
Shape3=Combine Shape | Union Shape2
DynamicVariables=1

[3]
Meter=Shape
Shape=Rectangle 910,530,120,70,35 | FillColor [Light1] | StrokeWidth=0
Shape2=Rectangle 910,530,70,70,15 | FillColor [Light1] | StrokeWidth=0
Shape3=Combine Shape | Union Shape2
MouseOverAction=[!SetOption #CURRENTSECTION# Shape "Rectangle 910,530,120,70,35 | FillColor [Average] | StrokeWidth=0"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# Shape "Rectangle 910,530,120,70,35 | FillColor [Light1] | StrokeWidth=0"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
DynamicVariables=1

[Time]
Measure=Time
Format=%H:%M %p

[TimeText]
Meter=String
MeasureName=Time
FontFace=Product Sans Medium
FontSize=16
FontColor=[Light3]
StringCase=Upper
X= 927.5
Y=552.5
Text=%1
AntiAlias=10
StringAlign=Left
DynamicVariables=1

@include2=#@#Others\Cal.ini
I hope this is better and I'm again sorry for not explaining clearly before.
User avatar
balala
Rainmeter Sage
Posts: 16325
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help With Chameleon Plugin

Post by balala »

DePixeled wrote: March 6th, 2024, 10:57 am I'm really sorry I'd completely forgotten about this post (too busy with my studies)
To can easily keep in mind where did you post, you can "ask" this forum to send you an email, whenever a reply is posted to a topic you've posted in. For this you have to check the "Notify me when a reply is posted" checkbox, below the field in which are you writing your reply.
Notify.png
DePixeled wrote: March 6th, 2024, 12:25 pm So here's an image and the plugin seems to work work fine when theres ine primary color like the purple here, but goes wonky when it has multiple colors and cant decide on one.
Which plugin? There is no plugin measure in the posted code. I assume those measures are in one of the included files, either in @Resources\Styles.inc, or much more probably in @Resources\Others\Cal.ini. However we don't know those files, so they would be needed.
You do not have the required permissions to view the files attached to this post.
DePixeled
Posts: 5
Joined: March 3rd, 2024, 1:42 pm

Re: Help With Chameleon Plugin

Post by DePixeled »

Here's the code for the plugin

Code: Select all

[ChameleonDesktop]
Measure=Plugin
Plugin=Chameleon
Type=Desktop
Format=Hex

[Background1]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Format=Dec
Color=Background1

[Background2]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Format=Dec
Color=Background2

[Foreground1]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Format=Dec
Color=Foreground1

[Foreground2]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Format=Dec
Color=Foreground2

[Light1]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Format=Dec
Color=Light1

[Light2]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Format=Dec
Color=Light2

[Light3]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Format=Dec
Color=Light3

[Light4]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Format=Dec
Color=Light4

[Dark1]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Format=Dec
Color=Dark1

[Dark2]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Format=Dec
Color=Dark2

[Dark3]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Format=Dec
Color=Dark3

[Dark4]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Format=Dec
Color=Dark4

[Average]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Format=Dec
Color=Average