%    colorrgb.m demo for uicontrol
%    Copyright (C) 2001  Valery Beloshapkin
%    this program may run from Matlab command window or to prepare
%    standalone applications  by command from matlab command window
%    mcc -m -B sgl graphic.m
%
%    This program is free software; you can redistribute it and/or modify
%    it under the terms of the GNU General Public License as published by
%    the Free Software Foundation; either version 2 of the License, or
%    (at your option) any later version.
%
%    This program is distributed in the hope that it will be useful,
%    but WITHOUT ANY WARRANTY; without even the implied warranty of
%    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%    GNU General Public License for more details.
%
%    You should have received a copy of the GNU General Public License
%    along with this program; if not, write to the Free Software
%    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
%
%   e-mail adress of author:  bvv@tnp.krasn.ru 

function colorrgb()
%#function hsc
global hs1 hs2 hs3 ht1 ht2 ht3 hf
figure(1)
set(gcf,'color',[1 1 0]);
hf=uicontrol('style','frame','backgroundcolor',[0 0 0],'units','normalized',...
'position',[0.5 0.1 0.3 0.3]);
hs1=uicontrol('style','slider','units','normalized','position',...
[0.1 0.1 0.05 0.3],'callback','hsc');
hs2=uicontrol('style','slider','units','normalized','position',...
[0.2 0.1 0.05 0.3],'callback','hsc');
hs3=uicontrol('style','slider','units','normalized','position',...
[0.3 0.1 0.05 0.3],'callback','hsc');
ht1=uicontrol('style','text','units','normalized','position',...
[0.05 0.01 0.1 0.06],'string','0');
ht2=uicontrol('style','text','units','normalized','position',...
[0.16 0.01 0.1 0.06],'string','0');
ht3=uicontrol('style','text','units','normalized','position',...
[0.27 0.01 0.1 0.06],'string','0');
uicontrol('style','pushbutton','units','normalized','position',...
[0.5 0.01 0.3 0.06],'callback','delete(gcf)','string','Cancel');
uicontrol('style','text','units','normalized','position',...
[0.08 0.41 0.08 0.05],'string','Red','backgroundcolor',[1 0 0]);
uicontrol('style','text','units','normalized','position',...
[0.18 0.41 0.08 0.05],'string','Green','backgroundcolor',[0 1 0]);
uicontrol('style','text','units','normalized','position',...
[0.28 0.41 0.08 0.05],'string','Blue','backgroundcolor',[0 0 1]);



