Thread Subject: Color format?

Subject: Color format?

From: Camron Call

Date: 24 Aug, 2009 20:39:07

Message: 1 of 3

What is the color format used by most GUI properties that ranges from 0-1? How do we convert it to RGB (0-255)?

Thanks.

Subject: Color format?

From: us

Date: 24 Aug, 2009 20:58:05

Message: 2 of 3

"Camron Call" <camroncall@gmail.cam> wrote in message <h6utpb$3rv$1@fred.mathworks.com>...
> What is the color format used by most GUI properties that ranges from 0-1? How do we convert it to RGB (0-255)?
>
> Thanks.

normalized rgb...

% hence
     guicolor=gray(3)
     rgbcolor=255*guicolor
%{
% guicolor =
            0 0 0
          0.5 0.5 0.5
            1 1 1
% rgbcolor =
            0 0 0
        127.5 127.5 127.5
          255 255 255
%}

us

Subject: Color format?

From: Dave Robinson

Date: 25 Aug, 2009 09:58:02

Message: 3 of 3

"us " <us@neurol.unizh.ch> wrote in message <h6uust$esc$1@fred.mathworks.com>...
> "Camron Call" <camroncall@gmail.cam> wrote in message <h6utpb$3rv$1@fred.mathworks.com>...
> > What is the color format used by most GUI properties that ranges from 0-1? How do we convert it to RGB (0-255)?
> >
> > Thanks.
>
> normalized rgb...
>
> % hence
> guicolor=gray(3)
> rgbcolor=255*guicolor
> %{
> % guicolor =
> 0 0 0
> 0.5 0.5 0.5
> 1 1 1
> % rgbcolor =
> 0 0 0
> 127.5 127.5 127.5
> 255 255 255
> %}
>
> us

Just a very minor point. 'Us' has titled his explaination as normalized RGB. This phrase is often used to describe a totally different colour space, which is an effective intensity independent RGB colour space, which bears no relevance to the original OP's question. I added this so as to prevent the OP from getting confused if he Googles Normalized RGB.

Regards

Dave Robinson

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
graphics handle us 24 Aug, 2009 16:59:14
code us 24 Aug, 2009 16:59:14
format Camron Call 24 Aug, 2009 16:39:24
color Camron Call 24 Aug, 2009 16:39:24
rgb Camron Call 24 Aug, 2009 16:39:24
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com