It is currently August 20th, 2019, 12:59 pm

Plugin: ColorExtract

Share and get help with Plugins and Addons
User avatar
balala
Rainmeter Sage
Posts: 8534
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Plugin: ColorExtract

balala » June 19th, 2018, 8:19 pm

Vetsus wrote:<snip>
I'm sorry I misunderstood you. But maybe would be great to not be so angry. Maybe everyone of us can have less better days...

So, here is the solution: the following [MeasureColor] measure removes the transparency value from the color code provided by the [Accent1] ColorExtract plugin measure:

Code: Select all

[MeasureColor]
Measure=String
String=[Accent1]
RegExpSubstitute=1
Substitute="^(\d{1,3}),(\d{1,3}),(\d{1,3}),(\d{1,3})$":"\1,\2,\3"
DynamicVariables=1
User avatar
jsmorley
Developer
Posts: 19357
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Plugin: ColorExtract

jsmorley » June 19th, 2018, 10:14 pm

balala wrote:I'm sorry I misunderstood you. But maybe would be great to not be so angry. Maybe everyone of us can have less better days...

So, here is the solution: the following [MeasureColor] measure removes the transparency value from the color code provided by the [Accent1] ColorExtract plugin measure:

Code: Select all

[MeasureColor]
Measure=String
String=[Accent1]
RegExpSubstitute=1
Substitute="^(\d{1,3}),(\d{1,3}),(\d{1,3}),(\d{1,3})$":"\1,\2,\3"
DynamicVariables=1
The user Vetsus has been banned for 24-hours, to give him time to reflect on how to interact with people trying to help him.

Rainmeter is flexible and powerful, and thus by definition can be complicated. Nobody who is try to be helpful here has all the answers, and almost never the only answer. Language difficulties in a global environment, confusion when describing or understanding problems, and even difference of opinion about approaches are certain, and working together to come to resolution and agreement, or even agreeing to disagree, is part of the fun. Nobody is going to be allowed to make it not fun, by trying to turn these forums into the cesspool of flame-wars, technical elitism, and hostility seen on so many other technical gathering places.

Rainmeter Forums Terms of Use
User avatar
balala
Rainmeter Sage
Posts: 8534
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Plugin: ColorExtract

balala » June 20th, 2018, 10:13 am

jsmorley wrote:The user Vetsus has been banned for 24-hours, to give him time to reflect on how to interact with people trying to help him.
I admit I misunderstood what Vetsus asked. I definitely did. So, probably is my fault, too. I'm sorry...
User avatar
jsmorley
Developer
Posts: 19357
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Plugin: ColorExtract

jsmorley » June 20th, 2018, 10:27 am

balala wrote:I admit I misunderstood what Vetsus asked. I definitely did. So, probably is my fault, too. I'm sorry...
I misunderstand what someone is asking almost as many times as I get it right. I think it is safe to assume that he person asking the question wants to be understood, and the person trying to help wants to understand, so sometimes that takes a little back-and-forth and some patience. Hostility is never helpful, and just won't be tolerated.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3483
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Plugin: ColorExtract

eclectic-tech » June 20th, 2018, 11:59 pm

Vetsus wrote:does anyone know of a way to remove the transparency section from these values? i have have been toying with webparser, but if any of the RGB values are 255 it seems to mess with it as the transparency is always 255 (ie 123,456,789,255)

any help would be awesome, and if someone has this figured out already, great!
If you read the information on the github page for this plugin, it tells you you can set the transparency for any of the 3 obtainable colors (Background, Accent1, Accent2) by adding COLORALPHA=XXX to the measure. The default value is 255, a solid color.

So to change the alpha to 128 for the color obtained for the background, set up the measure like this:

Code: Select all

[MeasureParent]
Measure=Plugin
Plugin=ColorExtract
ImagePath=#@#Images\cover.jpg

[MeasureBackgroundColor]
Measure=Plugin
Plugin=ColorExtract
ParentMeasure=[MeasureParent]
ColorType=Background
ColorAlpha=128
This will change the alpha of the background color to half the normal transparency. The same option exist for the Accent1 and Accent2 colors.

I would really recommend you look at the Chameleon plugin by socks-the-fox due to it offering more options. :great:

Another handy utility is BlendColor.lua script by hakshak that can color items based on measure percentage scales. :thumbup:
Vetsus
Posts: 27
Joined: March 7th, 2017, 5:29 pm

Re: Plugin: ColorExtract

Vetsus » June 21st, 2018, 5:19 pm

you are correct. i was frustrated. and i apologize, i know this is a forum and it's not really appropriate for me to act that way, nor is it right for me to apologize here. but i do apologize anyway. no excuses, i acted incorrectly and i apologize.
User avatar
balala
Rainmeter Sage
Posts: 8534
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Plugin: ColorExtract

balala » June 21st, 2018, 5:27 pm

Vetsus wrote:you are correct. i was frustrated. and i apologize, i know this is a forum and it's not really appropriate for me to act that way, nor is it right for me to apologize here. but i do apologize anyway. no excuses, i acted incorrectly and i apologize.
Ok, my fault, too and I apologize as well. Doesn't matter any more, I think.
Did you got it working well? I described a method, to remove the transparency value. eclectic-tech also did another one.
User avatar
jsmorley
Developer
Posts: 19357
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Plugin: ColorExtract

jsmorley » June 21st, 2018, 5:33 pm

Vetsus wrote:you are correct. i was frustrated. and i apologize, i know this is a forum and it's not really appropriate for me to act that way, nor is it right for me to apologize here. but i do apologize anyway. no excuses, i acted incorrectly and i apologize.
Consider the matter closed and forgotten.
Vetsus
Posts: 27
Joined: March 7th, 2017, 5:29 pm

Re: Plugin: ColorExtract

Vetsus » June 21st, 2018, 5:45 pm

ok. i know i posted again. but the snip from balala got my issue corrected. i did notate that i understood about the coloralpha but i use these colors for things with a variable transparency.

so for instance a 'bass' meter. so for a bass frequency i have it setup to create a 'dancing' meter so when the bass hits the bass becomes more visible. that is the reason i wanted the to remove the transparency completed and balala's correction for it worked beautifully. i really appreciate it.
User avatar
balala
Rainmeter Sage
Posts: 8534
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Plugin: ColorExtract

balala » June 21st, 2018, 6:01 pm

Vetsus wrote:balala's correction for it worked beautifully. i really appreciate it.
Ok, I'm glad.