balala wrote: ↑April 28th, 2024, 6:05 pm
You set different values for the GenreColor variable through the IfMatchActionX options of the [MeasureGenre] measure and here I have two remarks:
- The values set to the GenreColor variable (#Electro#, #EDM#, #House#, #DnB#" and #Dubstep#) are not defined, at least not in the posted code. Hope you have them defined somewhere, however if they are not, you can't use the set GenreColor variable.
- If those variables are defined, you get some real color codes for the GenreColor variable. But this variable is not used in the code. I assume you should want to use it in the Fill Color parameter of the MySharedModifiers option of the [Meter] meter. In this option you have so far the [CalcColors] measure, which probably should return a color code, but this measure is not present in the code. So replace it with the set up GenreColor variable: MySharedModifiers=Fill Color #GenreColor# | StrokeWidth 0.
I did have an additional 20 or so colours set up with properly defined RGBA codes, I just deleted them to reduce some of the monotony of IfMatch when reading. I have replaced the #EDM# etc. codes now with defined values.
I have replaced the [CalcColors] measure with [GenreColor] now in the [Measure] and the [Meter] and I still cannot get it to work. I would assume that I have written the [GenreColor] variable wrong near the bottom of the code, but I am very new to learning Rainmeter and code in general so I am unsure where I am going wrong.
I did manage to get the colours changing previously, but there were only 3 colours and they were incorrectly defined.
Here is the code I am have now. I have again left out many of the IfMatch actions as I have quite a few in the code.
Code: Select all
[Rainmeter]
Group=Anjunabeats
Update=10
BackgroundMode=2
AccurateText=1
DynamicWindowSize=1
DynamicVariables=1
SolidColor=0,0,0,0
[Measures]
[MeasurePlayer]
Measure=NowPlaying
PlayerName=#PlayerName#
PlayerType=Title
Substitute="":"N\A"
[MeasureArtist]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=Artist
Substitute="":"N\A"
[MeasureState]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=State
Substitute="0":"Play","1":"Pause","2":"Play"
[MeasureAlbum]
Measure=NowPlaying
PlayerName=#PlayerName#
PlayerType=Album
Substitute="":"N\A"
[MeasureGenre]
Measure=Plugin
Plugin=NowPlaying
PlayerName=#PlayerName#
PlayerType=Genre
; Electro
IfMatch=Electro\sHouse|Big\sRoom\sHouse|Melbourne\sBounce|Fidget\sHouse [!SetVariable GenreColor "230,206,0"]
IfMatchAction=[!SetVariable GenreColor "230,206,0"]
; Electronic/EDM
IfMatch2=Spoken\sWord|Novelty|Comedy|
IfMatchAction2=[!SetVariable GenreColor "193,193,193"]
; House
IfMatch3=Ambient\sHouse|Funky\sHouse|Deep\sTech|Progressive\sHouse|Future\sHouse|Hard\sHouse|Speed\sHouse|Microhouse|Tech\sHouse|Deep\sHouse|Organic\sHouse|Bass\sHouse|Garage\sHouse|Festival\sHouse|G-House|Afro\sHouse|Acid\sHouse|Hip\sHouse
IfMatchAction3=[!SetVariable GenreColor "234,140,6"]
; Drum & Bass
IfMatch4=Drum\s&\sBass
IfMatchAction4=[!SetVariable GenreColor "242,25,4"]
; Dubstep
IfMatch5=Dubstep
IfMatchAction5=[!SetVariable GenreColor "141,4,225"]
; Drumstep
IfMatch6=Drumstep|Halftime
IfMatchAction6=[!SetVariable GenreColor "243,33,136"]
; Glitch Hop
IfMatch7=Glitch\sHop|Moombahcore|Moombahton|Midtempo\sBass
IfMatchAction7=[!SetVariable GenreColor "11,151,87"]
; Trap
IfMatch8=Trap|Hip-Hop|Drift\sPhonk|Detroit\sElectro
IfMatchAction8=[!SetVariable GenreColor "140,15,39"]
; Trance
IfMatch9=Progressive\sTrance|Acid\sTrance|Electro\sTrance|Psy-Trance|Hard\sTrance|Uplifting\sTrance|Vocal\sTrance|Big\sRoom\sTrance|Tech\sTrance|Future\sRave|Acid\sTrance
IfMatchAction9=[!SetVariable GenreColor "0,126,231"]
; Hard Dance
IfMatch10=Hard\sDance|Hardcore\sEDM|Breakcore|Hardstyle
IfMatchAction10=[!SetVariable GenreColor "1,151,0"]
; Nu Disco/Indie Dance
IfMatch11=Electropop|Nu-disco|Synthpop|Synthwave|Disco|Indietronica|Electro-disco
IfMatchAction11=[!SetVariable GenreColor "28,171,179"]
; Future Bass
IfMatch12=Future\sBass
IfMatchAction12=[!SetVariable GenreColor "154,152,252"]
; Breaks
IfMatch13=Progressive\sBreaks|Breaks|Big\sBeat
IfMatchAction13=[!SetVariable GenreColor "18,132,101"]
; Industrial
IfMatch14=Industrial|Dark\sAmbient|Post-industrial|Electro-industrial
IfMatchAction14=[!SetVariable GenreColor "40,40,40"]
; UK Garage
IfMatch15=Speed\sGarage|2-step|Future\sGarage|Bassline|UK\sJackin
IfMatchAction15=[!SetVariable GenreColor "191,127,255"]
; Experimental
IfMatch16=Experimental|Drone|Improvisation|Noise|Power\sElectronics|Avant-prog
IfMatchAction16=[!SetVariable GenreColor "78,18,48"]
; Techno
IfMatch17=Techno|Ambient\sTechno|Peak\sTime\sTechno|Melodic\sTechno|Hard\sTechno|Industrial\sTechno|Minimal\sTechno|Dub\sTechno|Acid\sTechno
IfMatchAction17=[!SetVariable GenreColor "42,63,215"]
; Soundtrack
IfMatch18=Soundtrack
IfMatchAction18=[!SetVariable GenreColor "233,36,239"]
; Jazz
IfMatch19=Jazz|Jazz\sFusion|Swing
IfMatchAction19=[!SetVariable GenreColor "135,206,250"]
; Downtempo
IfMatch20=Downtempo|Trip\sHop|Progressive\sElectronic|Folktronica
IfMatchAction20=[!SetVariable GenreColor "146,222,104"]
; Leftfield Bass
IfMatch21=IDM|Wonky|Leftfield\sBass|Jungle\sTerror|Jersey\sClub|Juke\s/\sFootwork
IfMatchAction21=[!SetVariable GenreColor "70,89,107"]
; Folk
IfMatch22=Singer-Songwriter|Contemporary\sFolk|Progressive\sFolk|Neofolk|Regional\sFolk|World|Waltz|Acoustic|Classical|Chamber\sMusic|Opera
IfMatchAction22=[!SetVariable GenreColor "201,151,0"]
; Hardcore Punk
IfMatch23=Hardcore\sPunk|Metalcore|Mathcore|Post-hardcore|Melodic\sHardcore|Deathcore|Grindcore
IfMatchAction23=[!SetVariable GenreColor "103,78,167"]
; Punk
IfMatch24=Punk\sRock|Emo|Pop\sPunk|Post-punk|Darkwave
IfMatchAction24=[!SetVariable GenreColor "97,0,97"]
; Metal
IfMatch25=Drone\sMetal|Deathgrind|Progressive\sMetal|Thrash\sMetal|Death\sMetal|Black\sMetal|Groove\sMetal|Sludge\sMetal|Post-metal|Doom\sMetal|Speed\sMetal|Heavy\sMetal|Alternative\sMetal|Avant-garde\sMetal
IfMatchAction25=[!SetVariable GenreColor "216,57,0"]
; Rock
IfMatch26=Hard\sRock|Krautrock|Folk\sRock|Alternative\sRock|Post-rock|Jazz\sRock|Progressive\sRock|Art\sRock|Math\sRock|Gothic\sRock|Blues\sRock|Noise\sRock|Indie\sRock|Pop\sRock|Electronic\sRock|New\sWave
IfMatchAction26=[!SetVariable GenreColor "0,103,150"]
; Psychedelia
IfMatch27=Psychedelic\sRock|Psychedelic\sFolk|Neo-Psychedelia
IfMatchAction27=[!SetVariable GenreColor "185,78,72"]
; Ambient
IfMatch28=Ambient
IfMatchAction28=[!SetVariable GenreColor "240,180,181"]
; Pop
IfMatch29=Pop|R&B
IfMatchAction29=[!SetVariable GenreColor "255,127,182"]
Substitute="GenreColor":"#Color#"
OnChangeAction=[!UpdateMeasure "GenreColor"]
Disabled=1
DynamicVariables=1
[Meter]
[MeterShape]
Meter=Shape
Shape=Rectangle 43,0,1920,50 | Extend MySharedModifiers
Shape2=Rectangle 43,0,50,1080 | Extend MySharedModifiers
MySharedModifiers=Fill Color #GenreColor# | StrokeWidth 0
DynamicVariables=1
[Variables]
[GenreColor]
Meter=Bar
MeasureName=MeasureGenre
MeterStyle=[MeasureGenre]
Disabled=1
UpdateDivider=50
DynamicVariables=1
[ScriptRefresher]
Measure=Script
ScriptFile=#@#scripts\Refresher.lua
UpdateDivider=-1
Refreshed=0