Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to convert "Red/Green/Blue" to "Red/Yellow/Blue" color mix

1,814 views
Skip to first unread message

Peter Liu

unread,
Jul 24, 1996, 3:00:00 AM7/24/96
to

Anyone knows how to convert Red/Green/Blue (i.e. prime color of light)
to Red/Yellow/Blue (.e. prime color for paint materials and printer's
ink) ?

I want to write a painter program that allow user to mix color of Red,
Yellow, Blue. The conversion routine is necessary.
--
Peter Liu

Email: pet...@hk.super.net
Hong Kong

Dr H. T. Leung

unread,
Jul 24, 1996, 3:00:00 AM7/24/96
to cf...@hk.super.net, pet...@hk.super.net

No, I think the original poster <pet...@hk.super.net> really means to
convert from the screen display (additive system : Red-Green-Blue) to printing
(substractive system: should really be Magenta-Yellow-Cyan)

Well, try this (or a similar digital version involving multiplying by 256 etc)

Magenta = 1 - fraction of Green and Blue
Yellow = 1 - fraction of red +blue
Cyan = 1- fraction of green + red

You will find that the contrast/shade would be a bit strange and you will have to
adjust the gamma for your specific medium (reflectance of printing paper,
satuation of paints and their actual shades, the logorithmic sensitivity of
the eye etc). To adjust the gamma ( it is called "gamma" in most display/image
processing situations, but I think it refers to "gain" or something)

Try this algorithm; 0 < values < 1

New value = (old value) to the power some number.

The simple algorthm keeps the end points unchanged but shifts the middle up and
down depending on the power ( less than one or more than one). A value of either
0.5 or 2 should be sensible - don't know which way.

Good luck.

In article <RMlznCEG...@hk.super.net>, cf...@hk.super.net (LAM Chi-fung) writes:
|> > Anyone knows how to convert Red/Green/Blue (i.e. prime color of light)
|> > to Red/Yellow/Blue (.e. prime color for paint materials and printer's
|> > ink) ?
|> >
|> > I want to write a painter program that allow user to mix color of Red,
|> > Yellow, Blue. The conversion routine is necessary.

|> You mean CMYK ????
|>
|> Regds
|> LAM Chi-fung
|> ------------------------------------------------------------------------------
|> PC Game Cheat & Info list maintainer
|> finger me (cf...@hk.super.net) to get the sites carry the list
|> (current version is 6.0,wait for your comments)
|> ------------------------------------------------------------------------------

Peter Liu

unread,
Jul 25, 1996, 3:00:00 AM7/25/96
to

Actually, I mean Red/Yellow/Blue, not CMYK.

Conversion from RGB to CMYK is nothing new.

What I want is conversion from RGB to Red/Yellow/Blue, the primary
colors for paint materials used by artists.

Peter Liu wrote:
>
> Anyone knows how to convert Red/Green/Blue (i.e. prime color of light)
> to Red/Yellow/Blue (.e. prime color for paint materials and printer's
> ink) ?
>
> I want to write a painter program that allow user to mix color of Red,
> Yellow, Blue. The conversion routine is necessary.

LAM Chi-fung

unread,
Jul 25, 1996, 3:00:00 AM7/25/96
to

> Anyone knows how to convert Red/Green/Blue (i.e. prime color of light)
> to Red/Yellow/Blue (.e. prime color for paint materials and printer's
> ink) ?
>
> I want to write a painter program that allow user to mix color of Red,
> Yellow, Blue. The conversion routine is necessary.

TCM

unread,
Jul 26, 1996, 3:00:00 AM7/26/96
to

In article <31F6B7...@hk.super.net>, Peter Liu <pet...@hk.super.net> writes:
> Actually, I mean Red/Yellow/Blue, not CMYK.
>
> Conversion from RGB to CMYK is nothing new.
>
> What I want is conversion from RGB to Red/Yellow/Blue, the primary
> colors for paint materials used by artists.

It's not possible:

R:255
G:255
B:255

has no R/Y/B equiv, you'll have to add white paint, and to get black
from R/Y/B is nearly impossible.

--
The Cookie Monster (TCM)
- As far as anybody knows, I have a nice, normal mind...

Eric van Orsouw

unread,
Jul 26, 1996, 3:00:00 AM7/26/96
to

Peter Liu <pet...@hk.super.net> wrote:

>Actually, I mean Red/Yellow/Blue, not CMYK.

>Conversion from RGB to CMYK is nothing new.

>What I want is conversion from RGB to Red/Yellow/Blue, the primary
>colors for paint materials used by artists.

You're talking computers program, which means additive colors. Since
Yellow is Red + Green, this means than the following conversions have
to be made:

RGB -> RYB

Red -> Red
Red+Green -> Yellow
Blue -> Blue

and converting back: RYB -> RGB

Red -> Red
Yellow-Red -> Green
Blue -> Blue

Sounds fairly logical to me.
Eric van Orsouw


William H. Ivey

unread,
Jul 27, 1996, 3:00:00 AM7/27/96
to

In <1996Jul26.120103@cantva> TCM <misc...@csc.canterbury.ac.nz> (The

Cookie Monster [Glenn Fisher]) writes:
>
>In article <31F6B7...@hk.super.net>, Peter Liu
<pet...@hk.super.net> writes:
[...]
>> What I want is conversion from RGB to Red/Yellow/Blue, the primary
>> colors for paint materials used by artists.
>
>It's not possible:
>
>R:255
>G:255
>B:255
>
>has no R/Y/B equiv, you'll have to add white paint, and to get black
>from R/Y/B is nearly impossible.

If you assume white paper (the usual), then
RGB(255,255,255) ==> RYB(0,0,0)
And black is all colors subtracted, so it's RYB(255,255,255) (or the
equivalent largest values in whatever system you're using).-Wm

Panther (as in the Pinkboard Panther)

unread,
Jul 29, 1996, 3:00:00 AM7/29/96
to

Peter Liu <pet...@hk.super.net> wrote:

>What I want is conversion from RGB to Red/Yellow/Blue, the primary
>colors for paint materials used by artists.

Red, yellow and blue are not orthogonal, so any colour space created
from these threee colours would not include all possible colours.
Since you are talking about painting I assume you are talking about
subtractive colour (mixing paints). With these paint colours it is
impossible to get cyan or magenta. I think you will find artists often
use more than just those three colours.

What you could do is work in CMY (which is 255-R, 255-G, 255-B) and
then use M+Y as your red paint and C+M as your blue paint. Then add
the amounts selected to get the CMY colour.


love Panther
---
Panther (as in Pinkboard Panther) <pan...@pinkboard.com.au>
Larry Singer <lar...@pinkboard.com.au>
Larry Singer <la...@wright.com.au>
http://www.pinkboard.com.au/People/Panther.html
"Do you like boys or girls? It's so confusing these days."


John Anderson

unread,
Jul 29, 1996, 3:00:00 AM7/29/96
to

In article <1996Jul26.120103@cantva>, TCM <misc...@csc.canterbury.ac.nz> (The Cookie Monster [Glenn Fisher]) says:
>
>In article <31F6B7...@hk.super.net>, Peter Liu <pet...@hk.super.net> writes:
>> Actually, I mean Red/Yellow/Blue, not CMYK.
>>
>> Conversion from RGB to CMYK is nothing new.
>>
>> What I want is conversion from RGB to Red/Yellow/Blue, the primary
>> colors for paint materials used by artists.
>
>It's not possible:
>
>R:255
>G:255
>B:255
>
>has no R/Y/B equiv, you'll have to add white paint, and to get black
>from R/Y/B is nearly impossible.
>

It may not be possible to go to a RYB color space, since it may not have
been invented. But that may not be what the original poster really
wants to do.

If I was attempting to do this, I would use the HIS (Hue, Intensity,
Saturation) conversions to/from RGB. Once you are in the HIS color space,
you can determine the color tint from the Hue component. A good book to
use for a reference (equations, explanations, etc...) is called:

Title: Raster Graphics Handbook
Author: Conrac Corporation
Publisher: Van Nostrand Reinhold Company

Although I'm certainly not an expert in this area, its seems as though
all your paint mixing and assignment of stock and custom colors could
be made in HIS color space. There might also be a standard assignment
of colors that you could use. I've seen references to Pantone color
charts in some programs. They might already have specific HIS color
specifications.


John Anderson
Algorithm Engineering

Stephen Baynes

unread,
Jul 29, 1996, 3:00:00 AM7/29/96
to

William H. Ivey (wi...@ix.netcom.com) wrote:
: In <1996Jul26.120103@cantva> TCM <misc...@csc.canterbury.ac.nz> (The
: Cookie Monster [Glenn Fisher]) writes:
: >
: >In article <31F6B7...@hk.super.net>, Peter Liu
: <pet...@hk.super.net> writes:
: [...]
: >> What I want is conversion from RGB to Red/Yellow/Blue, the primary

: >> colors for paint materials used by artists.
: >
: >It's not possible:
: >
: >R:255
: >G:255
: >B:255
: >
: >has no R/Y/B equiv, you'll have to add white paint, and to get black
: >from R/Y/B is nearly impossible.

: If you assume white paper (the usual), then


: RGB(255,255,255) ==> RYB(0,0,0)
: And black is all colors subtracted, so it's RYB(255,255,255) (or the
: equivalent largest values in whatever system you're using).-Wm

The impossible colours to get are things such as CYAN and MAGENTA. You
can't get those with RYB as your paints. [eg Mixing R and B will give you
a murkey dark magenta, not pure magenta.]

Now what has this to do with comp.unix.programer? Don't ask me.

--
Stephen Baynes bay...@ukpsshp1.serigate.philips.nl
Philips Semiconductors Ltd
Southampton My views are my own.
United Kingdom
Are you using ISO8859-1? Do you see © as copyright, ÷ as division and ½ as 1/2?

Jeff Cowl

unread,
Jul 30, 1996, 3:00:00 AM7/30/96
to

In article <4tdb2q$1...@sjx-ixn5.ix.netcom.com>, wi...@ix.netcom.com(William H. Ivey) says:
>>It's not possible:
snip

>If you assume white paper (the usual), then
> RGB(255,255,255) ==> RYB(0,0,0)
>And black is all colors subtracted, so it's RYB(255,255,255) (or the
>equivalent largest values in whatever system you're using).-Wm

The first statment is not correct, it is possible to convert RGB to other formats.
Most standard conversion/output systems support only light color systems RGB and CMYK:

white = Red=255,Green=255,Blue=255 (RGB)
white = Cyan=0,Magenta=0,Yellow=0,Black=0 (CMYK)

These are used because computer monitors and colour filmwork use a light source.

The three primary colours for artists is a subtractive color system.
Paint only reflects light so the way each color mix is created is totally different.

Although CMYK is a subtractive system, it is merely an inversion of the RGB system and is
still used for light.e.g.

Red = {R=255,G=0,B=0} = {C=0,M=255,Y=255,B=0}

When a light source has a magenta filter placed in front of it, red & blue light passes
through. When a yellow filter is used, red and green light is passes through. When both
filters are used, blue light is blocked by the yellow filter and green light is blocked
by the magenta filter, only red light passes through.

Magenta paint reflects red & blue light, yellow paint reflects red & green light. When
magenta and yellow paint is mixed, some blue and some green is still reflected along with
the red light and the color is not true.

Are you attempting to duplicate milticolor artwork, for the printing industry, in a
screenprinting(or other paint based) system?

The inks printers use are unlike paint as they are a FILTER for the white light reflected
from the page.

You will need to work out your own conversion system to convert palettes.

hope this helps.

Jeff

Stealthy Kiwi
co...@fphcare.fp.co.nz
"My opinion is my own (unless someone else thought of it first)"
<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>
This communication is made personally
by me and does not represent or purport
to represent the Fisher & Paykel Group
or any of its subsidiaries in any way.
<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>

gyw...@gmail.com

unread,
Mar 23, 2017, 3:48:14 AM3/23/17
to
On Tuesday, July 30, 1996 at 9:00:00 AM UTC+2, Jeff Cowl wrote:
> In article <4tdb2q$1fc(a)sjx-ixn5.ix.netcom.com>, wivey(a)ix.netcom.com(William H. Ivey) says:
> The first statment is not correct, it is possible to convert RGB to other formats.

I know it is an old post, after googling intensively I found a solution - at least for primary, secondary and tertiary colors.

Trouble is, that
Red == Red
Yellow == Yellow but
Blue =/ Blue

Thus calculation is difficult.

Primary Colors:
Red #FF0000
Yellow #FFFF00
Blue #2A6099

Secondary:
Purple: #800080
Orange: #FF8000
Green: 00AA33

Tertiary:
Teal:#158466
Chartreuse: #80D41A
Amber: FFBF00
Vermillion: #FF5349
Magenta: #BF0041
Violet: #55308D

jamesb...@gmail.com

unread,
Dec 11, 2019, 1:50:31 PM12/11/19
to
On Wednesday, July 24, 1996 at 2:00:00 AM UTC-5, Peter Liu wrote:
> Anyone knows how to convert Red/Green/Blue (i.e. prime color of light)
> to Red/Yellow/Blue (.e. prime color for paint materials and printer's
> ink) ?
>
> I want to write a painter program that allow user to mix color of Red,
> Yellow, Blue. The conversion routine is necessary.
> --
> Peter Liu
>
> Email: pet...@hk.super.net
> Hong Kong
our saturation must come from the lowest value of RGB. But once again, we subtract that value from one. Therefore, from our white light where all the values are at 100%, we subtract that from one and get zero. Zero times 100% is zero; we now have a perfect black in RYB.
Partial Yellow
red and green in RGB make yellow. If they are equal, then we have no red or green to carry over to RYB. If red is greater than green, then we have a partial yellow and red will be diminished by the green.
Partial Green
Since green is diminished by red, if it is greater than red, the difference is now added to the yellow and blue in RYB. The reason is, green in RYB is blue and yellow.
The Semi-Final Equation
Our near final equation should look like this:
• Red subtractive = (red additive – partial green + luminosity) times saturation.
• Yellow subtractive = (partial yellow + partial green + luminosity) times saturation.
• Blue subtractive = (blue additive + partial green + luminosity) times saturation.

A Second Problem
If blue and green or high in RGB and red is low, then our values for blue and maybe yellow are going to go over 255 or 100%. The proposed solution is if this condition occurs, is to divide all the RYB values by that percentage. This re-normalizes our values.

0 new messages