Public Group

# heeh color problem

This topic is 4884 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

hey i just wanna get the intensity value of a D3DCOLOR value or COLORREF i tryed intensity = (r+g+b)/3 but it wont work good : ( any help

##### Share on other sites
The intensity is the highest value of any color. For example, if you had a color (240, 6, 130) the intensity would be 240. If you had a color (0, 0, 0) the intensity would be 0.

##### Share on other sites
(r+g+b)/3 is brightness. If you want to use luminance instead, that's 0.299r + 0.587g + 0.114b. That's supposed to correspond better with what people actually perceive as how bright something is.

##### Share on other sites
ey thanks that worked much better : )

##### Share on other sites
Quote:
 Original post by furby100(r+g+b)/3 is brightness. If you want to use luminance instead, that's 0.299r + 0.587g + 0.114b. That's supposed to correspond better with what people actually perceive as how bright something is.

I remember reading that people perceive excess blue as brightness. Shouldn't blue have a larger scalar than green in this equation then? Or is that the reason it has the smallest scalar?

##### Share on other sites
Quote:
Original post by sordid
Quote:
 Original post by furby100(r+g+b)/3 is brightness. If you want to use luminance instead, that's 0.299r + 0.587g + 0.114b. That's supposed to correspond better with what people actually perceive as how bright something is.

I remember reading that people perceive excess blue as brightness. Shouldn't blue have a larger scalar than green in this equation then? Or is that the reason it has the smallest scalar?

Bringing up two palettes, one for 00FF00 and another for 0000FF (RRGGBB format), I find that green appears to be much brighter for myself. According to that equasion, 00FF00 would have a luminance of 0.587 whereas 0000FF would have a mere 0.114, which seems somewhat plausable to me.

I don't know much about color theory, but I do know that our eyes are most sensitive to different shades of green (between RGB anywyas), which is the reason that the extra bit in 16-bit RGB, if used, is used for green.

1. 1
Rutin
33
2. 2
3. 3
4. 4
5. 5

• 13
• 9
• 9
• 9
• 14
• ### Forum Statistics

• Total Topics
633329
• Total Posts
3011381
• ### Who's Online (See full list)

There are no registered users currently online

×