Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
String color in IDE
#26
OK here is more color stuff ;-))
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 + ...
Reply


Messages In This Thread
String color in IDE - by Dimster - 03-12-2024, 08:22 PM
RE: String color in IDE - by Pete - 03-12-2024, 08:49 PM
RE: String color in IDE - by bplus - 03-12-2024, 08:52 PM
RE: String color in IDE - by Pete - 03-12-2024, 09:24 PM
RE: String color in IDE - by SMcNeill - 03-12-2024, 09:46 PM
RE: String color in IDE - by bplus - 03-12-2024, 10:39 PM
RE: String color in IDE - by Pete - 03-12-2024, 11:10 PM
RE: String color in IDE - by bplus - 03-12-2024, 11:39 PM
RE: String color in IDE - by Pete - 03-12-2024, 11:48 PM
RE: String color in IDE - by bplus - 03-12-2024, 11:51 PM
RE: String color in IDE - by Pete - 03-13-2024, 12:04 AM
RE: String color in IDE - by bplus - 03-13-2024, 12:46 AM
RE: String color in IDE - by Pete - 03-13-2024, 01:18 AM
RE: String color in IDE - by SMcNeill - 03-13-2024, 01:32 AM
RE: String color in IDE - by TerryRitchie - 03-13-2024, 03:58 AM
RE: String color in IDE - by a740g - 03-13-2024, 11:29 AM
RE: String color in IDE - by SMcNeill - 03-13-2024, 05:38 AM
RE: String color in IDE - by bplus - 03-13-2024, 10:07 AM
RE: String color in IDE - by Kernelpanic - 03-13-2024, 12:39 PM
RE: String color in IDE - by TerryRitchie - 03-13-2024, 01:14 PM
RE: String color in IDE - by Dimster - 03-13-2024, 02:28 PM
RE: String color in IDE - by bplus - 03-13-2024, 02:37 PM
RE: String color in IDE - by Kernelpanic - 03-13-2024, 03:57 PM
RE: String color in IDE - by Dimster - 03-13-2024, 04:00 PM
RE: String color in IDE - by Kernelpanic - 03-13-2024, 04:12 PM
RE: String color in IDE - by bplus - 03-13-2024, 04:30 PM
RE: String color in IDE - by bplus - 03-13-2024, 04:35 PM
RE: String color in IDE - by Dimster - 03-13-2024, 09:30 PM
RE: String color in IDE - by RhoSigma - 03-13-2024, 11:20 PM
RE: String color in IDE - by Pete - 03-14-2024, 12:28 AM
RE: String color in IDE - by Dimster - 03-14-2024, 01:28 PM
RE: String color in IDE - by bplus - 03-15-2024, 02:47 AM



Users browsing this thread: 1 Guest(s)