It is currently March 28th, 2024, 11:08 am

Image RGB Cycle / Desktop RGB Cycle

Skins with graphics and animations
Post Reply
SizeableSchlong
Posts: 4
Joined: November 18th, 2017, 7:54 pm

Image RGB Cycle / Desktop RGB Cycle

Post by SizeableSchlong »

After playing around with it for a while, I've finally come up with a solution to my triple monitor setup. I wanted to have a unique desktop background on each monitor, and have it fully animated. I've come up with this solution. I use a purely black background in Windows Default settings. Then I use a 5760x1080 PNG file with the background removed as a desktop overly in rain meter. I then wrote a program that changes the tint of the image based on dragging the slider of an RGB color selector. This will work with any image put into the @Resources\Images Folder, as long as it is named "Image.png"; obviously you can update it if you know how, but that's the easiest way.

@People better at this than me: How can I isolate the RGB code to a .inc file, and use the color variables globally through the skin? I'd like to include some custom gauges etc that use the same RGB variables. The only challenge would be getting the skin to update the variables. I made an attempt but not totally sure how to go about it.

IMGUR DEMO https://imgur.com/QaDKQSN

MY PNG FILE IS ATTACHED

Code: Select all

[Rainmeter]
Update = 25

[Variables]
Red=255
Green=255
Blue=255
Reset=0

[Image_To_RGB_Tint]
Meter = Image
ImageName=#@#Images\Image.png
PreserveAspectRatio=1
ImageTint=#Red#,#Green#,#Blue#
DynamicVariables=1


;===========================================================================

[Change_Colors] 
Measure=Calc
IfConditionMode=1
DynamicVariables=1

;=== ( 	Red 	)
IfCondition=(#Red#=255)&&(#Green#<=255)&&(#Green#>0)&&(#Blue#<=255)&&(#Blue#>0)&&(#Reset#=0)
IfTrueAction=[!SetVariable Green "(#Green#-5)"]&&[!SetVariable Blue "(#Blue#-5)"]

;=== ( 	Purple 	)
IfCondition2=(#Red#=255)&&(#Green#=0)&&(#Blue#>=0)&&(#Blue#<255)
IfTrueAction2=[!SetVariable Blue "(#Blue#+5)"]

IfCondition3=(#Red#=255)&&(#Green#=0)&&(#Blue#>=0)&&(#Blue#<255)
IfTrueAction3=!SetVariable Blue "(#Blue#+5)"

;=== ( 	Blue 	)
IfCondition4=(#Red#<=255)&&(#Red#>0)&&(#Green#=0)&&(#Blue#=255)
IfTrueAction4=!SetVariable Red "(#Red#-5)"

;== ( 	Cyan 	)
IfCondition5=(#Red#=0)&&(#Green#>=0)&&(#Green#<255)&&(#Blue#=255)
IfTrueAction5= !SetVariable Green "(#Green#+5)"

;== ( 	Green 	)
IfCondition6=(#Red#=0)&&(#Green#=255)&&(#Blue#<=255)&&(#Blue#>0)
IfTrueAction6=!SetVariable Blue "(#Blue#-5)"

;== ( 	Yellow	)
IfCondition7=(#Red#>=0)&&(#Red#<255)&&(#Green#=255)&&(#Blue#=0)
IfTrueAction7=[!SetVariable Red "(#Red#+5)"]&&[!SetVariable Reset "1"]

;== ( 	Reset	)
IfCondition8=(#Red#=255)&&(#Green#=255)&&(#Blue#>=0)&&(#Blue#<255)&&(#Reset#=1)
IfTrueAction8=!SetVariable Blue "(#Blue#+5)"

IfCondition9=(#Red#=255)&&(#Green#=255)&&(#Blue#=255)&&(#Reset#=1)
IfTrueAction9=!SetVariable Reset "0"
Attachments
Image.png
SizeableSchlong
Posts: 4
Joined: November 18th, 2017, 7:54 pm

Re: Image RGB Cycle / Desktop RGB Cycle

Post by SizeableSchlong »

Also, I've run into a really tough issue with screen positioning. Because, the PNG image is 3 screens wide: (5760/1080), and because of the way Rainmeter loads screens, it has absolutely no clue with what to do with the image. The only way I can get the skin to align properly is to set the Coordinates to -3840 in the Manage Rainmeter settings. However, ANY time rainmeter is refreshed, or the computer is restarted, it defaults the value to -1920, moving the skin too far to the right. The coordinate setting of -3840 refuses to stay saved through computer restarts, or any time I refresh Rainmeter. Outside of that however, the skin works perfectly; I can manually set the coordinate to -3840, and it stays as long as I dont restart, or refresh. Not the absolute worst issue. Anyway, I'm looking for a solution.

Things that don't work at all:

*** Setting the @x display monitor settings to load it from the left monitor. Literally just changes nothing.
*** Adding negative values in the position x of the skin settings: the farthest it will go is starting the load from the left side of the center monitor (the highest the negative coordinates will load is -1920, is what I assume is happening).


Things that almost work, but still don't:


*** Setting the coordinates to x= -3840(1920 x 2 screens) in the manage Rainmeter settings. The issue with this, is on refresh, computer restart, or literally anything that loads Rainmeter, it resets the coordinates to -1920, and I have to re-enter the coordinates manually. If you press the refresh button AT ALL, it resets back to -1920.

*** The absolute closest I've gotten to a solution is adding a Transparent image to the skin code (SolidColor=255,255,255,0), setting the dimensions to my screen size (1920x1080), and then loading the PNG file as X=-1920R, which loads the picture 1920 pixels to the left of the middle monitor. Unfortunately, this doesn't work either. The alignment works perfectly, but Rainmeter doesn't load anything on the left monitor: it simply cuts off any part of the image to the left of the center monitor.


Any ideas on how to work around this? Thanks in advance guys!
Post Reply