It is currently September 16th, 2024, 10:37 pm
Aero Color
-
- Posts: 17
- Joined: August 29th, 2012, 5:41 am
Aero Color
I was just wondering, is there a way to make a skin grab the color scheme from Windows Aero, the way Windows 8 or AeroRainbow does? I was hoping I can use the effect in one of my skins
-
- Posts: 1740
- Joined: November 13th, 2012, 9:53 pm
Re: Aero Color
you could use this plugin:
http://rainmeter.net/forum/viewtopic.php?f=18&t=14202
if it does not do what you want:
- do a Google search for where in the registry the values you are looking for are stored.
- use a registry measure: http://docs.rainmeter.net/manual/measures/registry
http://rainmeter.net/forum/viewtopic.php?f=18&t=14202
if it does not do what you want:
- do a Google search for where in the registry the values you are looking for are stored.
- use a registry measure: http://docs.rainmeter.net/manual/measures/registry
-
- Posts: 56
- Joined: December 27th, 2011, 12:32 pm
Re: Aero Color
Use a registry measure to read
HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor
Value is in AARRGGBB format. Unfortunately, Rainmeter uses RRGGBBAA for colors, so you'll have to somehow convert the values.
HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor
Value is in AARRGGBB format. Unfortunately, Rainmeter uses RRGGBBAA for colors, so you'll have to somehow convert the values.
-
- Posts: 1175
- Joined: June 9th, 2010, 5:56 pm
- Location: Locks heath, UK
Re: Aero Color
A Calc with Trunc and Frac can do this for you. Something like this - you might need to check my maths
First one discards numbers to the right after the first two digits, the second divides and keeps the remaining numbers...
First one discards numbers to the right after the first two digits, the second divides and keeps the remaining numbers...
Code: Select all
[CalcAlpha]
Measure=Calc
Formula=Trunc(MeasureColorizationColor/100)
[CalcRGB]
Measure=Calc
Formula=Frac(MeasureColorizationColor/100)*100
-
- Posts: 56
- Joined: December 27th, 2011, 12:32 pm
Re: Aero Color
I'm not sure that'll work since the registry key returns Hex values that include letters.Seahorse wrote:A Calc with Trunc and Frac can do this for you. Something like this - you might need to check my maths
First one discards numbers to the right after the first two digits, the second divides and keeps the remaining numbers...
Code: Select all
[CalcAlpha] Measure=Calc Formula=Trunc(MeasureColorizationColor/100) [CalcRGB] Measure=Calc Formula=Frac(MeasureColorizationColor/100)*100
-
- Posts: 65
- Joined: January 31st, 2013, 5:28 pm
Re: Aero Color
How about?
Code: Select all
RegExpSubstitute=1
Substitute="^(\d)(\d)(\d)(\d)(\d)(\d)(\d)(\d)$":"2\3\4\5\6\7\0\1"
-
- Developer
- Posts: 2732
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: Aero Color
I don't think any of the above will convert a ARGB to a RGBA. What is really needed is a shift-left(<<) and shift-right(>>) operators (which are an undocumented feature of the Calc measure), but it doesn't work well since the Calc measure uses floating-point arithmetic (we would need unsigned integer arithmetic).
So, to solve the problem, I think the best solution would be to do a little Lua script to convert it. (This is a modified version of the color snippet.)
Note: This also converts the Hex values to decimal values and separates them with a comma.
-Brian
So, to solve the problem, I think the best solution would be to do a little Lua script to convert it. (This is a modified version of the color snippet.)
Code: Select all
function ARGBtoRGBA(color)
local rgba = { }
for hex in color:gmatch('..') do
table.insert(rgba, tonumber(hex, 16))
end
-- move the first element (alpha) to the end of the table
rgba[1], rgba[2], rgba[3], rgba[4] = rgba[2], rgba[3], rgba[4], rgba[1]
return table.concat(rgba, ',')
end
-Brian
-
- Posts: 329
- Joined: June 9th, 2011, 6:46 pm
Re: Aero Color
I had the same problem.
So you can try Brian's lua script or you take a look of jsmorley's lua script here.
But why use a lua script if you can use Brian's great SysColor Plugin.
So you can try Brian's lua script or you take a look of jsmorley's lua script here.
But why use a lua script if you can use Brian's great SysColor Plugin.
Rainmeter - You are only limited by your imagination and creativity.
-
- Developer
- Posts: 2732
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: Aero Color
HA! I remember that thread, but I couldn't find it. I would be inclined to use jsmorely's script over mine as he is much better Lua scripter than I am, plus that is a more complete example.
[ShamlessPlug]Over course there is my plugin.....[/ShamlessPlug]
-Brian
[ShamlessPlug]Over course there is my plugin.....[/ShamlessPlug]
-Brian