Contents
Previous
Next
Class >Hierarchy>
>Fl_Group>
> |
> +---->Fl_Color_Chooser>
>
Include >Files>
>#include <FL/Fl_Color_Chooser.H>
>
Description>
The >Fl_Color_Chooser> widget >provides >a >
standard >RGB >color > chooser. > You >can >place >any >
number >of >these >into >a >panel >of >your >own >
design. > This >widget >contains >the >hue >box, >value >
slider, >and >rgb >input > fields >from >the >above >
diagram >(it >does >not >have >the >color >chips >or >
the > Cancel >or >OK >buttons). > The >callback >is >
done >every >time >the >user > changes >the >rgb >
value. > It >is >not >done >if >they >move >the >hue >
control >in > a >way >that >produces >the >same>
rgb >value, >such >as >when >saturation > or >value >
is >zero. >
Methods>
Creates >a >new >Fl_Color_Chooser> widget >using >
the >given > position, >size, >and >label >string. >The >
recommended >dimensions >are > 200x95. >The >color >is >
initialized >to >black. >
The >destructor >removes >the >color >chooser >and >all >
of >its >controls. >
Return >the >current >hue. > 0 ><= >hue >< >6. >
Zero >is >red, >one >is >yellow, > two >is >green, >
etc. >This >value >is >convienent >for >the >internal >
calculations >- >some >other >systems >consider >hue >to >
run >from >zero >to >one, > or >from >0 >to >360.>
Returns >the >saturation. > 0 ><= >saturation ><= >1. >
Returns >the >value/brightness. > 0 ><= >value ><= >1. >
Returns >the >current >red >value. > 0 ><= >r ><= >
1. >
Returns >the >current >green >value. > 0 ><= >g ><= >
1. >
Returns >the >current >blue >value. > 0 ><= >b ><= >
1. >
Sets >the >current >rgb >color >values. > Does >not >
do >the >callback. > Does > not >clamp >(but >out >of >
range >values >will >produce >psychedelic >effects >in >
the >hue >selector). >
Set >the >hsv >values. > The >passed >values >are >
clamped >(or >for >hue, > modulus >6 >is >used) >to >
get >legal >values. > Does >not >do >the >callback. >
This >static> method >converts >HSV >colors >to >
RGB >colorspace. >
This >static> method >converts >RGB >colors >to >
HSV >colorspace. >
Contents
Previous
Next