It is currently March 29th, 2024, 10:02 am
!FadeDuration Color Transition
-
- Posts: 5
- Joined: November 7th, 2017, 7:47 am
!FadeDuration Color Transition
I'm sure this is a simple question with a simple answer, but I was wondering if you could use the new !FadeDuration bang to do a color transition effect. The way I am currently doing it is just by swapping colors upon a MouseOverAction, but it is an immediate swap. I was looking to see if I could use this to pull the same thing but with a little more grace. I am trying to replicate the color transition on a windows task bar. I will post the skin for anyone who is interested in playing around with it. If there is no easy way to do it, then it isn't a huge deal. The current effect is still quite alright in my opinion.
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: !FadeDuration Color Transition
I don't think it could be used for a color transition effect, because the !FadeDuration bang set the duration of the fade effect, when you're using the !ShowFade / !HideFade / !ToggleFade bangs. These bangs are showing / hiding a skin, not certain meter of a skin. That's why I don't see a way to use this bang for a such effect.TrueSalt wrote:I was wondering if you could use the new !FadeDuration bang to do a color transition effect.
However I think you could use the ActionTimer plugin for such effect, but I'm not sure it worth. It would complicate too much the code.
And one more: Update=10 is not an appropriate value for the update. The lowest update which can be used is Update=16, smaller one isn't accepted. For details see the second paragraph here: https://docs.rainmeter.net/manual/skins/rainmeter-section/#Update.
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: !FadeDuration Color Transition
balala is quite right.
First off, to fade-transition between two colors in a meter would require an ActionTimer measure. But for something like what you are doing, it would be a lot of code. The issue is that You want only the color on the meter you are actively moving the mouse over to change, so you would likely need to have a different set of ActionTimer ActionList(N)'s for each meter.
Then there is the complexity of changing between two RGB (rrr,ggg,bbb) colors in and of itself. You would need to separate the color into the red/green/blue components, and address each of those separately to arrive at the new color.
If you simplify the idea, and treat the color as a set "hue", in the HSB (hue, saturation, brightness) color model, and then just change the "brightness" component of that, the color transition wouldn't be as bad, I have a Lua library for HSB that can make that pretty easy.
But it's still going to be just a ton of work. You will need to have the ActionTimer measure call the HSBLib for Lua to change the brightness in steps, and use that result in the meter SolidColor or FontColor or whatever. The problem is that you are going to need to do this for each meter you want to treat this way, and that is quickly going to grow to a lot of code and a lot of effort.
Turning this process into something "canned", that you can just plug into a skin where you need it, would take a lot of thought. I fear ending up with some kind of Rube Goldberg machine that is hard to understand, hard to use, and hard to modify.
First off, to fade-transition between two colors in a meter would require an ActionTimer measure. But for something like what you are doing, it would be a lot of code. The issue is that You want only the color on the meter you are actively moving the mouse over to change, so you would likely need to have a different set of ActionTimer ActionList(N)'s for each meter.
Then there is the complexity of changing between two RGB (rrr,ggg,bbb) colors in and of itself. You would need to separate the color into the red/green/blue components, and address each of those separately to arrive at the new color.
If you simplify the idea, and treat the color as a set "hue", in the HSB (hue, saturation, brightness) color model, and then just change the "brightness" component of that, the color transition wouldn't be as bad, I have a Lua library for HSB that can make that pretty easy.
But it's still going to be just a ton of work. You will need to have the ActionTimer measure call the HSBLib for Lua to change the brightness in steps, and use that result in the meter SolidColor or FontColor or whatever. The problem is that you are going to need to do this for each meter you want to treat this way, and that is quickly going to grow to a lot of code and a lot of effort.
Turning this process into something "canned", that you can just plug into a skin where you need it, would take a lot of thought. I fear ending up with some kind of Rube Goldberg machine that is hard to understand, hard to use, and hard to modify.
-
- Posts: 5
- Joined: November 7th, 2017, 7:47 am
Re: !FadeDuration Color Transition
Yeah I can see the issues that would arise from trying to use this method. That is why I stated that I was fine with the current set of things just in case the method to due it would be more trouble than it is worth. A lot of the things in this skin have already caused me plenty of headaches and have been put together in what could be considered as an inexperienced and spotty way. As maybe you could tell, I am not all to knowledgeable in making skins as I just got into Rainmeter recently and didn't really like any of the current skins out there. I felt they were a bit to messy for my tastes, so this is my first attempt at making my own fully custom skin. I have made edits and addons for other skins here and there as practice, but nothing to this scale. Also, thanks balala for the info, I didn't fully read through every section of that guide and kinda skipped to parts that I needed, so I kinda imagine that I missed a lot of important info. I will have to go take a more through look at it at some point.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: !FadeDuration Color Transition
This is the best with Rainmeter: you can easily modify / rewrite a skin, to make it to look and act as you want.TrueSalt wrote:I just got into Rainmeter recently and didn't really like any of the current skins out there. I felt they were a bit to messy for my tastes,
Skipping some parts happens easily, especially when you're a beginner. Don't worry, with all my experience in coding skins (I think I have a small), I many times read the help while I'm working and even so, I also miss things sometimes.TrueSalt wrote:Also, thanks balala for the info, I didn't fully read through every section of that guide and kinda skipped to parts that I needed, so I kinda imagine that I missed a lot of important info. I will have to go take a more through look at it at some point.
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: !FadeDuration Color Transition
I knocked together some ActionTimer / Lua scripting to "fade" the brightness of a color between two levels on a mouse over / mouse leave.TrueSalt wrote:Yeah I can see the issues that would arise from trying to use this method. That is why I stated that I was fine with the current set of things just in case the method to due it would be more trouble than it is worth. A lot of the things in this skin have already caused me plenty of headaches and have been put together in what could be considered as an inexperienced and spotty way. As maybe you could tell, I am not all to knowledgeable in making skins as I just got into Rainmeter recently and didn't really like any of the current skins out there. I felt they were a bit to messy for my tastes, so this is my first attempt at making my own fully custom skin. I have made edits and addons for other skins here and there as practice, but nothing to this scale. Also, thanks balala for the info, I didn't fully read through every section of that guide and kinda skipped to parts that I needed, so I kinda imagine that I missed a lot of important info. I will have to go take a more through look at it at some point.
While it works fine, as you can see, it's a fair amount of code in your skin if you want to effect a ton of meters.
https://forum.rainmeter.net/viewtopic.php?p=141242#p141242