It is currently March 28th, 2024, 9:53 pm

How to make color transfusion

Get help with creating, editing & fixing problems with skins
GFTs
Posts: 14
Joined: June 10th, 2022, 10:47 am

Re: How to make color transfusion

Post by GFTs »

Let me arrive home then i'll post it for sure !
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to make color transfusion

Post by Yincognito »

GFTs wrote: June 10th, 2022, 12:28 pm Let me arrive home then i'll post it for sure !
Alrighty then. :thumbup:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
GFTs
Posts: 14
Joined: June 10th, 2022, 10:47 am

Re: How to make color transfusion

Post by GFTs »

This is my entier code

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 
i wonder if i can make the clock cloro itself changeing like rainbow.
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.
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to make color transfusion

Post by Yincognito »

GFTs wrote: June 10th, 2022, 2:24 pm This is my entier code

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 
i wonder if i can make the clock cloro itself changeing like rainbow.
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?
Last edited by Yincognito on June 10th, 2022, 3:27 pm, edited 1 time in total.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
GFTs
Posts: 14
Joined: June 10th, 2022, 10:47 am

Re: How to make color transfusion

Post by GFTs »

the color of the text :Whistle
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to make color transfusion

Post by Yincognito »

GFTs wrote: June 10th, 2022, 3:26 pm the color of the text :Whistle
Ah, ok.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to make color transfusion

Post by Yincognito »

GFTs wrote: June 10th, 2022, 3:26 pm the color of the text :Whistle
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
I left the Disabled and mouse actions lines commented out, in case you want to start / pause / reset / stop the transition manually. You can delete them if you don't need that - the code is now transitioning colors automatically and forever. You can change the Direction variable to -1 if you want the transition to go in the opposite (reverse) direction, or you can adjust the other variables to your liking, according to the description in my earlier posts.

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. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
GFTs
Posts: 14
Joined: June 10th, 2022, 10:47 am

Re: How to make color transfusion

Post by GFTs »

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)
User avatar
David8192
Posts: 246
Joined: July 8th, 2021, 11:30 pm
Location: The King's Avenue, Golden Kingdom

Re: How to make color transfusion

Post by David8192 »

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)
Use Format = time[%H:%M] date(%#d/%m) without the #.
the DA GALLERY 8-) For some Reason, the square root of X2 does not involve X
GFTs
Posts: 14
Joined: June 10th, 2022, 10:47 am

Re: How to make color transfusion

Post by GFTs »

thank you so much!!