It is currently April 25th, 2024, 7:46 am
Gradient angle in relation to time
-
- Posts: 75
- Joined: August 5th, 2014, 2:09 am
Gradient angle in relation to time
When using solidcolor and solidcolor2, how do I get the gradientangle to rotate with a 24-hour clock? I've tried a couple of different methods, but to no avail. Ideas?
-
- Rainmeter Sage
- Posts: 16168
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Gradient angle in relation to time
Code: Select all
[Rainmeter]
Update=1000
[MeasureHours]
Measure=Time
Format=%#H
[MeasureMinutes]
Measure=Time
Format=%#M
[MeasureAngle]
Measure=Calc
Formula=(( 60 * MeasureHours + MeasureMinutes ) / 4 )
[MeterBackground]
Meter=Image
SolidColor=255,0,0
SolidColor2=0,255,0
GradientAngle=[MeasureAngle]
X=0
Y=0
W=150
H=150
DynamicVariables=1
-
- Posts: 75
- Joined: August 5th, 2014, 2:09 am
Re: Gradient angle in relation to time
I think that helped but I'm still having trouble with a skin. I should be able to upload it tonight for someone to pick apart and figure out what I may have screwed up.
...to be continued...
...to be continued...
-
- Posts: 75
- Joined: August 5th, 2014, 2:09 am
Re: Gradient angle in relation to time
Well that took longer than expected... fml...FuzzyLizard530 wrote:I think that helped but I'm still having trouble with a skin. I should be able to upload it tonight for someone to pick apart and figure out what I may have screwed up.
...to be continued...
At any rate:
There's 2 skins in here. The one that opens up SHOULD be the one I'm wanting to rotate the gradient on, the other one being the one I want it to mirror [in color only, hence the gradient].
I have a slightly modified version [mostly just names of variables/options/sections. Shouldn't change anything, right?] of the code you/balala had above [with some of my own code commented out, because I'm apparently not the mathematician I thought I was. ]
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 16168
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
-
- Posts: 75
- Joined: August 5th, 2014, 2:09 am
Re: Gradient angle in relation to time
balala wrote:And do you have any question about these codes?
As a matter of fact... Yes! As far as I can tell, I'm not getting anything. It doesn't seem to move at all. I check it at any time of day, and Solidcolor1 and Solidcolor2 are still in the same places they were every time. :/ also, if it's stuck at the starting angle, I need to change it do that it starts with one of the colors at the top. Doesn't matter which, I can fix that once I get everything else in order.FuzzyLizard530 wrote:I think that helped but I'm still having trouble with a skin. I should be able to upload it tonight for someone to pick apart and figure out what I may have screwed up.
...
There's 2 skins in here. The one that opens up SHOULD be the one I'm wanting to rotate the gradient on, the other one being the one I want it to mirror [in color only, hence the gradient].
I have a slightly modified version [mostly just names of variables/options/sections. Shouldn't change anything, right?] of the code you/balala had above [with some of my own code commented out, because I'm apparently not the mathematician I thought I was. ]
-
- Rainmeter Sage
- Posts: 16168
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Gradient angle in relation to time
But it is! Only that the visible part of the [MeterHours] is too small. This meter is hidden behind the [MeterFront] meter and we can see only a small part of it. Reduce its height, to be the same as its width (H=80).FuzzyLizard530 wrote:As far as I can tell, I'm not getting anything. It doesn't seem to move at all.
To confirm, replace for a moment the Formula option of the [TimeRot] measure, with Formula=( 6 * MeasureSecs ). Because the number of seconds is between 0 and 59, this formula will return a number between 0 and 354, so into one minute a complet turn will occur. Now you can better see how the colors are rotating (don't forget to restore the original formula).
-
- Posts: 75
- Joined: August 5th, 2014, 2:09 am
-
- Rainmeter Sage
- Posts: 16168
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
-
- Posts: 75
- Joined: August 5th, 2014, 2:09 am
Re: Gradient angle in relation to time
Been a while [Life... Sheesh!] I've been pretty happy with the results overall, but I did have a curiosity pique my interest:
Would it be possible to have the rotation adjusted, say, on a daily basis by the sunrise/sunset time pulled from a given weather site? and How much trouble would it be?
Would it be possible to have the rotation adjusted, say, on a daily basis by the sunrise/sunset time pulled from a given weather site? and How much trouble would it be?