03-13-2024, 04:30 PM
OK here is more color stuff ;-))
Another color clipper.
Code: (Select All)
_Title "Color CONST for _RGBA32(red, green, blue, alpha)"
'>>>>>>>>>>>> test your colors here
'>>>>>>>>>>>> then create and name Hex string CONSTs if you want to the Clipboard
Screen _NewImage(800, 600, 32)
_ScreenMove _Middle
If _Clipboard$ <> "" Then
Input "Clear clipboard? enter y for yes "; w$
If w$ = "y" Then _Clipboard$ = ""
End If
Do
Cls
Print "Enter 4 numbers (0-255) for _RGBA32( red, green, blue, alpha) you want to test "
Input "(Don't forget commas) "; r, g, b, a
MakeConst$ = "&H" + Right$(String$(8, "0") + Hex$(_RGBA32(r, g, b, a)), 8)
Line (90, 300)-(710, 590), , B
Line (100, 310)-(700, 580), Val(MakeConst$), BF
Print "Use this Hex string for color CONST: "; MakeConst$
Input " Press c enter to add to ClipBoard, press q enter to quit, just enter to continue.."; w$
If w$ = "c" Then
Input "Name your CONST "; cname$
_Clipboard$ = _Clipboard$ + Chr$(10) + "CONST " + cname$ + "~& = " + MakeConst$
End If
If w$ = "q" Then System
Loop
'sample from clipboard
Const invisibleRed~& = &H00FF0000
Const barelyBlue~& = &H0A0000FF
Const anotherRed~& = &HFFC81E28
Another color clipper.
b = b + ...