Re: !P.background color question [message #60297] |
Wed, 07 May 2008 11:13 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
3Rs writes:
> Ok and with this color how can I change the !P.background color ???
> I want to draw WIDGET_DRAWS with this color.
>
> Thanks for the rutine ! ;)
Widget_Control, drawWidgetID, Get_Value=wid
WSet, wid
ERASE, COLOR=FSC_COLOR('face')
Or,
TVLCT, FSC_COLOR('FACE', /TRIPLE), !P.BACKGROUND
Widget_Control, drawWidgetID, Get_Value=wid
WSet, wid
ERASE, COLOR=!P.Background
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|
Re: !P.background color question [message #60300 is a reply to message #60299] |
Wed, 07 May 2008 10:23  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
3Rs writes:
> I want to know what is the number of the color [185,185,185] in B-W
> LINEAR palette for set this number in the system varibale !
> P.BACKGROUND.
> The idea is set the WIDGET_DRAW background color at the same color of
> the widgets default color.
>
> If this is not a good idea I accept suggestions :)
The easiest way to get this color (which is called 'Face')
is with FSC_COLOR. Here is what it is on my Windows machine:
IDL> Print, FSC_COLOR('Face', /Triple)
236
233
216
It won't have anything to do with which color table you
have loaded, as this is a system color.
You can find FSC_COLOR here:
http://www.dfanning.com/programs/fsc_color.pro
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|