It is currently November 29th, 2023, 4:38 am
How to make color transfusion
-
- Posts: 14
- Joined: June 10th, 2022, 10:47 am
Re: How to make color transfusion
Let me arrive home then i'll post it for sure !
-
- Rainmeter Sage
- Posts: 6366
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
-
- Posts: 14
- Joined: June 10th, 2022, 10:47 am
Re: How to make color transfusion
This is my entier code
i wonder if i can make the clock cloro itself changeing like rainbow.
Code: Select all
[Rainmeter]
Name = Windows Taskbar Clock
Author = lynxNZL
OnRefreshAction=[!ZPos "2"]
[Variables]
text_color = 0,255,0,255
bg_color = 0,0,0,1
font = Segoe UI SemiLight
fontsize = 9
w = 120
h = 30
[MeasureClock]
Timezone = +2
Measure = Time
Format = time[%#H:%#M] date(%#d/%m)
[FontStyle]
FontFace = #font#
FontSize = #fontsize#
FontColor = #text_color#
StringAlign = center
AntiAlias = 1
[Size]
Meter = Image
SolidColor = #bg_color#
w = #w#
h = #h#
[MeterClock]
Meter = STRING
MeasureName = MeasureClock
MeterStyle = FontStyle
X = (#w#/2)
Y = 6
Last edited by eclectic-tech on June 10th, 2022, 3:17 pm, edited 1 time in total.
Reason: Please use the code tag </> when posting long codes.
Reason: Please use the code tag </> when posting long codes.
-
- Rainmeter Sage
- Posts: 6366
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: How to make color transfusion
So, just to be clear, you want the color of the TEXT to transition through rainbow colors, or the color of the BACKGROUND? Or maybe BOTH, in opposite directions?GFTs wrote: ↑June 10th, 2022, 2:24 pm This is my entier code
i wonder if i can make the clock cloro itself changeing like rainbow.Code: Select all
[Rainmeter] Name = Windows Taskbar Clock Author = lynxNZL OnRefreshAction=[!ZPos "2"] [Variables] text_color = 0,255,0,255 bg_color = 0,0,0,1 font = Segoe UI SemiLight fontsize = 9 w = 120 h = 30 [MeasureClock] Timezone = +2 Measure = Time Format = time[%#H:%#M] date(%#d/%m) [FontStyle] FontFace = #font# FontSize = #fontsize# FontColor = #text_color# StringAlign = center AntiAlias = 1 [Size] Meter = Image SolidColor = #bg_color# w = #w# h = #h# [MeterClock] Meter = STRING MeasureName = MeasureClock MeterStyle = FontStyle X = (#w#/2) Y = 6
Last edited by Yincognito on June 10th, 2022, 3:27 pm, edited 1 time in total.
-
- Posts: 14
- Joined: June 10th, 2022, 10:47 am
Re: How to make color transfusion
the color of the text 

-
- Rainmeter Sage
- Posts: 6366
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
-
- Rainmeter Sage
- Posts: 6366
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: How to make color transfusion
There you go:
Code: Select all
[Rainmeter]
Name = Windows Taskbar Clock
Author = lynxNZL
OnRefreshAction=[!ZPos "2"]
Update=#FastUpdate#
DefaultUpdateDivider=#UpdateDivider#
[Variables]
text_color = 0,255,0,255
bg_color = 0,0,0,1
font = Segoe UI SemiLight
fontsize = 9
w = 120
h = 30
FastUpdate=25
SlowUpdate=1000
UpdateDivider=(#SlowUpdate#/#FastUpdate#)
Increment=4
Direction=1
StartColor=0
Quantifier=#StartColor#
Alternator=0
[Transition]
; Disabled=1
Measure=Calc
Formula=((#CURRENTSECTION#+#Increment#)%256)
RegExpSubstitute=1
Substitute="^(.*)$":"(255*(1*(1+(#Direction#))/2+#Alternator#*(1-(#Direction#))/2)-((#Direction#)*(\1)*((1-(#Direction#))/2+(#Direction#)*#Alternator#))),0,(255*(1*(1-(#Direction#))/2+#Alternator#*(1+(#Direction#))/2)+((#Direction#)*(\1)*((1+(#Direction#))/2-(#Direction#)*#Alternator#))),255","^((?:[^,]*,){#Quantifier#})((?:[^,]*,)*)(.*)$":"\2\1\3","\\\d":""
IfCondition=((#CURRENTSECTION#+#Increment#)>=256)
IfTrueAction=[!SetVariable Alternator (1-#Alternator#)][!SetVariable Quantifier ((3+#Quantifier#+#Direction#*#Alternator#*1)%3)]
IfConditionMode=1
UpdateDivider=1
DynamicVariables=1
[MeasureClock]
Timezone = +2
Measure = Time
Format = time[%#H:%#M] date(%#d/%m)
[FontStyle]
FontFace = #font#
FontSize = #fontsize#
FontColor = #text_color#
StringAlign = center
AntiAlias = 1
[Size]
Meter = Image
SolidColor = #bg_color#
w = #w#
h = #h#
[MeterClock]
Meter = STRING
MeasureName = MeasureClock
MeterStyle = FontStyle
FontColor = [Transition]
X = (#w#/2)
Y = 6
; LeftMouseUpAction=[!UnpauseMeasure Transition][!ToggleMeasure Transition][!SetVariable Quantifier #StartColor#][!SetVariable Alternator 0][!UpdateMeasure Transition][!UpdateMeter *][!Redraw]
; MiddleMouseUpAction=[!TogglePauseMeasure Transition]
UpdateDivider=1
DynamicVariables=1
You should compare the older code with the new one, to understand what I did. It's not hard at all, just some copy paste in the right places from the example I wrote here and a few minor adjustments, and if you get the idea, next time you'll be able to do it yourself.

-
- Posts: 14
- Joined: June 10th, 2022, 10:47 am
Re: How to make color transfusion
Awesome!! and may i have another questin ? about the clock format. when it counts to 00 minutes till 09, it shows only one digit , like `0` `1` `2`, how can i make it even when the clock is 2 minutes, to show `02` not `2` ?
Code: Select all
Format = time[%#H:%#M] date(%#d/%m)
-
- Posts: 246
- Joined: July 8th, 2021, 11:30 pm
- Location: The King's Avenue, Golden Kingdom
Re: How to make color transfusion
Use Format = time[%H:%M] date(%#d/%m) without the #.GFTs wrote: ↑June 10th, 2022, 4:44 pm Awesome!! and may i have another questin ? about the clock format. when it counts to 00 minutes till 09, it shows only one digit , like `0` `1` `2`, how can i make it even when the clock is 2 minutes, to show `02` not `2` ?
Code: Select all
Format = time[%#H:%#M] date(%#d/%m)
-
- Posts: 14
- Joined: June 10th, 2022, 10:47 am
Re: How to make color transfusion
thank you so much!!