Combines the average of 5 user-determined hues for a more gradual way to search out the perfect color.
+ Code Snippetsync on:sync rate 25
backdrop on
color backdrop rgb(26,8,0)
dim BoxColor(5)
Black=rgb(0,0,0):Grey=rgb(128,128,128):Red=rgb(200,0,0):Green=rgb(0,200,0):Blue=rgb(0,0,200):White=rgb(255,255,255)
BoxColor(1)=White:BoxColor(2)=Grey:BoxColor(3)=Grey:BoxColor(4)=Grey:BoxColor(5)=Grey
do
WhichColor=0:SliderColor=0:rMix=0:gMix=0:bMix=0:
for swatch=1 to 5
x1=swatch*100:x2=(swatch*100)+(screen width()*.1):y1=screen height()*.1:y2=screen height()*.2
box x1-2,y1-2,x2+2,y2+2,Grey,Grey,Grey,Grey
box x1,y1,x2,y2,BoxColor(swatch),BoxColor(swatch),BoxColor(swatch),BoxColor(swatch)
`RED
box x1,(screen height()*.8)-rgbr(BoxColor(swatch)),x1+(screen width()*.01),(screen height()*.8),Black,Red,Black,Red
`GREEN
box x1+(screen width()*.045),(screen height()*.8)-rgbg(BoxColor(swatch)),x1+(screen width()*.055),(screen height()*.8),Black,Green,Black,Green
`BLUE
box x1+(screen width()*.09),(screen height()*.8)-rgbb(BoxColor(swatch)),x1+(screen width()*.10),(screen height()*.8),Black,Blue,Black,Blue
if mousex()>=x1 and mousex()<=x1+(screen width()*.10) then WhichColor=swatch
if WhichColor=swatch
SliderColor=Green
if mousex()<=x1+(screen width()*.033) then SliderColor=Red
if mousex()>=x1+(screen width()*.066) then SliderColor=Blue
endif
if mouseclick()=1 and WhichColor>0
SliderLevel=255-(mousey()-(screen height()*.30))
if SliderLevel<0 then SliderLevel=0 else if SliderLevel>255 then SliderLevel=255
r=rgbr(BoxColor(WhichColor))
g=rgbg(BoxColor(WhichColor))
b=rgbb(BoxColor(WhichColor))
if SliderColor=Red then BoxColor(WhichColor)=rgb(SliderLevel,g,b)
if SliderColor=Green then BoxColor(WhichColor)=rgb(r,SliderLevel,b)
if SliderColor=Blue then BoxColor(WhichColor)=rgb(r,g,SliderLevel)
endif
inc rMix,rgbr(BoxColor(swatch))
inc gMix,rgbg(BoxColor(swatch))
inc bMix,rgbb(BoxColor(swatch))
next
NewColor=rgb(rMix/5,gMix/5,bMix/5)
box screen width()*.1,screen height()*.85,screen width()*.9,screen height()*.98,NewColor,NewColor,NewColor,NewColor
text 0,0,"INT: "+str$(NewColor)
text 0,20,"R:"+str$(rMix/5)+" G:"+str$(gMix/5)+" B:"+str$(bMix/5)
sync
loop