It is currently April 23rd, 2024, 9:54 am

ColorMatrix parameter

General topics related to Rainmeter.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

ColorMatrix parameter

Post by mak_kawa »

I am now trying Rainmeter's color matrix for some image. In the ColorMatrix Guide by kenz0, I see the calculation parameters, lumR, lumG and lumB, their values are (0.3086, 0.6094 and 0.0820) or (0.2125, 0.7154, and 0.0721), respectively. Guess they are "luminance of red, green, and blue", in fact their total is just 1.000.

But... I couldn't find the way to calculate situationally these values. Are they global constants instead?? If so, what basis for the values?
I think it seems to change according to the source image (or its pixels?) as variables. Due to my lack of knowledge about color engineering... I can't figure out at all.

Apparently, my test image is properly(?) modified in contrast, brightness, and saturation using the lumR, lumG and lumB parameters as constants specified above. But I am not completely convinced yet.

Any thought and suggestion?
User avatar
Halloyo
Posts: 31
Joined: June 17th, 2020, 3:08 am

Re: ColorMatrix parameter

Post by Halloyo »

lumR, lumG, lumB are constants.

They are weighted based on the human eye. I'm no expert, but basically, in computer screens, green makes up the majority of the light perceived by humans, whilst blue makes up the least.

I remember having read somewhere that one of these sets of constants (or another similar) is a standard by some national television (?) group (???).

https://en.wikipedia.org/wiki/Relative_luminance

Also, this link by W3:

https://www.w3.org/WAI/GL/wiki/Relative_luminance

(It touches upon colourspaces and those are kinda long to explain with my level of knowledge)
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: ColorMatrix parameter

Post by mak_kawa »

Hi Halloyo

Thanks a lot!
They are the coefficients using in the formula that gets the "relative luminance"... I am now fully convinced about the values lumR,G,B used in ColorMatrix Guide. I will sleep well. :-)

BTW, in fact this is related with the Heavens-Above's chart image. I am not satisfied a bit with it. So I thought the ColorMatrix could figure out, and actually it did.
User avatar
Halloyo
Posts: 31
Joined: June 17th, 2020, 3:08 am

Re: ColorMatrix parameter

Post by Halloyo »

What did you do to it? I'm curious.

Also, I've posted the skin I made on Github (I did credit you for the MJD measures) and I wrote some presets in it.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: ColorMatrix parameter

Post by mak_kawa »

Hi Halloyo

Wow, your work is a great stuff... really helpful for me.

My usage of the ColorMatrix is not a big deal. :-)
Especially when Greyscale=1, constellation lines in the returned chart are somewhat too thin, so they are sometimes not visible in reduced display even if with AntiAlias=1 image meter option.
My workaround is to set contrast, brightness, and saturation for the image display. So far, parameter variables for the Greyscale=1 chart are as follows;

Code: Select all

[Variables]
Brightness=-0.5
Contrast=2
Saturation=1.5
Method to produce ColorMatrixN= options from these parameters is as presented in the ColorMatrix Guide.