Home > Archive > VC Language > May 2006 > Yellow Color Range
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Yellow Color Range
|
|
|
| Hi,
Maybe it's a bit OT, I have been programming in VC++
and wondering what the color yellow range is in hex
say 1560000 to 2000001 can be regarded as Yellow
Thanks
Jack
| |
|
| Also, I am looking at the CIE System
Does anyone know what the ranges of yellow are for the CIE system?
Thanks
Jack
"Jack" <jl@knight.com> 撰寫於郵件新聞:O92ABX9fGHA.1264@TK2MSFTNGP05.phx.gbl...
> Hi,
> Maybe it's a bit OT, I have been programming in VC
> and wondering what the color yellow range is in hex
> say 1560000 to 2000001 can be regarded as Yellow
> Thanks
> Jack
>
| |
| David Webber 2006-05-25, 4:19 am |
|
"Jack" <jl@knight.com> wrote in message
news:O92ABX9fGHA.1264@TK2MSFTNGP05.phx.gbl...
> Maybe it's a bit OT, I have been programming in VC++
> and wondering what the color yellow range is in hex
> say 1560000 to 2000001 can be regarded as Yellow
1. The colours are represented as a red/green/blue mixture in the
hexadecimal form
rrggbb
where each letter represents a hex digit. rr is the red component gg is
the green component, and bb is the blue component.
So "everything"
FFFFFF = white
and "nothing"
0000000 = black
xyxyxy will have the same amount (xy) of each and be a shade of grey.
The eye perceives yellow in the same way as a mixture of green and red, and
so
abxy00
will be a yellowish shade with
FFFF00
being bright saturated yellow. Adding some blue
FFFFxy
will lighten it as xy goes from 00 to FF through cream to white.
But any
abcdxy
will be a yellowish tinge as long as
ab >> xy
cd >> xy
with ab approximately equal to cd.
2. The reason it works like this is that the eye has three kinds of sensor
which fire primarily on red, green, and blue, but each responds to a range
of frequencies and they overlap. But in simple terms
Red light fires the red sensor
Green light fires the green sensor
Yellow light, which has a frequency intermediate between red and green,
fires both. Thus we are incapable of telling the difference between yellow
light and a mixture of red and green, just because of the way the eye works.
The whole concept of mixing light or pigment to create colour is based, not
on light, but on the biology of the eye.
IIRC the octopus has four kinds of sensor in its eye, and can therefore
distinguish a complete extra dimension of colour. Creatures which have
only one, only see in monochrome.
Dave
--
David Webber
Author MOZART the music processor for Windows -
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm
| |
|
| tried this
====================
for (int i = 0; i < ds.dsBm.bmHeight; i++) {
for (int j = 0; i < ds.dsBm.bmWidth; j++) {
if (pBitmap[i][j] == RGB(255,255,0)) <<< failed this (pBitmap[i][j] was
not correctly stated)
AfxMessageBox ("Hit it", MB_OK, NULL);
}
}
=====================
"David Webber" <dave@musical.demon.co.uk> 撰寫於郵件新聞:e93$Fu9fGHA.4864@TK2MSFTNGP05.phx.gbl...
>
> "Jack" <jl@knight.com> wrote in message
> news:O92ABX9fGHA.1264@TK2MSFTNGP05.phx.gbl...
>
>
> 1. The colours are represented as a red/green/blue mixture in the
> hexadecimal form
>
> rrggbb
>
> where each letter represents a hex digit. rr is the red component gg is
> the green component, and bb is the blue component.
>
> So "everything"
>
> FFFFFF = white
>
> and "nothing"
>
> 0000000 = black
>
> xyxyxy will have the same amount (xy) of each and be a shade of grey.
>
> The eye perceives yellow in the same way as a mixture of green and red,
> and so
>
> abxy00
>
> will be a yellowish shade with
>
> FFFF00
>
> being bright saturated yellow. Adding some blue
>
> FFFFxy
>
> will lighten it as xy goes from 00 to FF through cream to white.
>
> But any
>
> abcdxy
>
> will be a yellowish tinge as long as
>
> ab >> xy
> cd >> xy
>
> with ab approximately equal to cd.
>
> 2. The reason it works like this is that the eye has three kinds of sensor
> which fire primarily on red, green, and blue, but each responds to a range
> of frequencies and they overlap. But in simple terms
>
> Red light fires the red sensor
> Green light fires the green sensor
>
> Yellow light, which has a frequency intermediate between red and green,
> fires both. Thus we are incapable of telling the difference between
> yellow light and a mixture of red and green, just because of the way the
> eye works. The whole concept of mixing light or pigment to create colour
> is based, not on light, but on the biology of the eye.
>
> IIRC the octopus has four kinds of sensor in its eye, and can therefore
> distinguish a complete extra dimension of colour. Creatures which have
> only one, only see in monochrome.
>
> Dave
> --
> David Webber
> Author MOZART the music processor for Windows -
> http://www.mozart.co.uk
> For discussion/support see
> http://www.mozart.co.uk/mzusers/mailinglist.htm
>
>
>
>
>
>
>
>
>
| |
| Alex Blekhman 2006-05-25, 8:16 am |
| David Webber wrote:
> [...]
> IIRC the octopus has four kinds of sensor in its eye, and
> can therefore distinguish a complete extra dimension of
> colour.
Strictly speaking, it's not sensor but special pigment on
onctopus' retina which can change orientation of sensor
cells, hence the ability of polarization discrimantion. So,
octopus can percieve another "dimension" of polarized light.
P-vision helps octopus to prey otherwise nearly invisible
plankton and jellyfishes.
| |
| David Webber 2006-05-25, 7:08 pm |
|
"Alex Blekhman" <tkfx.N05P4M@yahoo.com> wrote in message
news:OWwZMm%23fGHA.1520@TK2MSFTNGP03.phx.gbl...
> Strictly speaking, it's not sensor but special pigment on onctopus' retina
> which can change orientation of sensor cells, hence the ability of
> polarization discrimantion. So, octopus can percieve another "dimension"
> of polarized light. P-vision helps octopus to prey otherwise nearly
> invisible plankton and jellyfishes.
Thanks for the clarification - it was something I became vaguely aware of
years ago and was lurking in the abyssal domain which is my memory :-)
Dave
--
David Webber
Author MOZART the music processor for Windows -
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm
| |
| David Webber 2006-05-25, 7:08 pm |
|
"Jack" <jl@knight.com> wrote in message
news:%232rQxA%23fGHA.4940@TK2MSFTNGP05.phx.gbl...
> tried this
> ====================
> for (int i = 0; i < ds.dsBm.bmHeight; i++) {
> for (int j = 0; i < ds.dsBm.bmWidth; j++) {
> if (pBitmap[i][j] == RGB(255,255,0)) <<< failed this (pBitmap[i][j] was
> not correctly stated)
> AfxMessageBox ("Hit it", MB_OK, NULL);
> }
> }
> =====================
Not completely sure what you're attemppting here but there surely shouldn't
be an 'i' specifying the termination of second (inner) 'for' loop.
Dave
--
David Webber
Author MOZART the music processor for Windows -
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm
|
|
|
|
|