_TITLE "Color Dialog" 'started by B+ 2019-06-21
'from :"Color CONST for _RGBA32(red, green, blue, alpha)" 'B+ 2019-05-19
'2019-05-26 update this for mouse inputs
'>>>>>>>>>>>> test your colors here
'>>>>>>>>>>>> then create and name Hex string CONSTs if you want to the Clipboard
'sample clipping
CONST Purple
= &HFFB400B4 ' 2019-06-21 start Color Dialog
COLOR &HFF0000BB, &HFFAAAAAA PRINT "in 4 secs Color Dialog comes up..." rc$ = colorDialog$
PRINT "Color Dialog returned this:"; rc$
'first screen dimensions items to restore at exit
'save old settings to restore at end ofsub
'screen snapshot
r = 128: g = 128: b = 128: a = 128
slider 16, 10, r, "Red"
slider 16, 60, g, "Green"
slider 16, 110, b, "Blue"
slider 16, 160, a, "Alpha"
_PRINTSTRING (150, 260), "Press enter or spacenbar, if you want to use the color: " + makeConst$
_PRINTSTRING (210, 280), "Press escape or q, to not use any color, returns 0." LINE (90, 300)-(710, 590), , B
f = 255 * (i - 100) / 600
'put things back
'clear key presses
'clear mouse clicks
SUB slider
(x
, y
, value
, label$
) CASE "Red": c~&
= &HFFFF0000 CASE "Green": c~&
= &HFF008800 CASE "Blue": c~&
= &HFF0000FF CASE "Alpha": c~&
= &H88FFFFFF LINE (x
, y
)-STEP(3 * value
, 40), c~&
, BF