Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
String color in IDE
#31
As I suspected Rho ...Thanks for your explanation. Sometimes it's very important to bring our dreams back to reality. Maybe the future AIqb64pe will adapt Screen 0 to meet all our needs??
Thanks again.
Reply
#32
@Dimster here is another app you can run when writing code for colors by name:
Code: (Select All)
_Title "Chart Color32_bi Hexadecimal" 'b+ 2020-02-22  for QB64 v1.4 and newer
$Color:32
Type ColorConst
    NAME As String
    value As String
End Type
Dim Shared cc(0 To 269) As ColorConst
Screen _NewImage(720, 640, 32)
_ScreenMove 100, 20
'load data
For i = 0 To 269
    Read cc(i).NAME, cc(i).value
    row = Int(i / 18): col = i Mod 18
    Line (col * 40, row * 40)-Step(40, 40), Val(cc(i).value), BF
Next

While _KeyDown(27) = 0
    While _MouseInput: Wend
    mx = Int(_MouseX / 40): my = Int(_MouseY / 40)
    If mx >= 0 And mx <= 18 And my >= 0 And my <= 14 Then
        Line (0, 600)-(720, 640), Black~&, BF
        oRed = (255 + _Red32(Val(cc(my * 18 + mx).value)) - 128) Mod 256
        oGrn = (255 + _Green32(Val(cc(my * 18 + mx).value)) - 128) Mod 256
        oBlu = (255 + _Blue32(Val(cc(my * 18 + mx).value)) - 128) Mod 256
        cText 720 / 2 + 2, 620 + 2, 40, _RGB32(oRed, oGrn, oBlu), cc(my * 18 + mx).NAME + ", " + cc(my * 18 + mx).value
        cText 720 / 2, 620, 40, Val(cc(my * 18 + mx).value), cc(my * 18 + mx).NAME + ", " + cc(my * 18 + mx).value
    End If
    _Display
    _Limit 30
Wend
System
'Color32.bi as data
Data AliceBlue~&,&HFFF0F8FF
Data Almond~&,&HFFEFDECD
Data AntiqueBrass~&,&HFFCD9575
Data AntiqueWhite~&,&HFFFAEBD7
Data Apricot~&,&HFFFDD9B5
Data Aqua~&,&HFF00FFFF
Data Aquamarine~&,&HFF7FFFD4
Data Asparagus~&,&HFF87A96B
Data AtomicTangerine~&,&HFFFFA474
Data Azure~&,&HFFF0FFFF
Data BananaMania~&,&HFFFAE7B5
Data Beaver~&,&HFF9F8170
Data Beige~&,&HFFF5F5DC
Data Bisque~&,&HFFFFE4C4
Data Bittersweet~&,&HFFFD7C6E
Data Black~&,&HFF000000
Data BlanchedAlmond~&,&HFFFFEBCD
Data BlizzardBlue~&,&HFFACE5EE
Data Blue~&,&HFF0000FF
Data BlueBell~&,&HFFA2A2D0
Data BlueGray~&,&HFF6699CC
Data BlueGreen~&,&HFF0D98BA
Data BlueViolet~&,&HFF8A2BE2
Data Blush~&,&HFFDE5D83
Data BrickRed~&,&HFFCB4154
Data Brown~&,&HFFA52A2A
Data BurlyWood~&,&HFFDEB887
Data BurntOrange~&,&HFFFF7F49
Data BurntSienna~&,&HFFEA7E5D
Data CadetBlue~&,&HFF5F9EA0
Data Canary~&,&HFFFFFF99
Data CaribbeanGreen~&,&HFF1CD3A2
Data CarnationPink~&,&HFFFFAACC
Data Cerise~&,&HFFDD4492
Data Cerulean~&,&HFF1DACD6
Data ChartReuse~&,&HFF7FFF00
Data Chestnut~&,&HFFBC5D58
Data Chocolate~&,&HFFD2691E
Data Copper~&,&HFFDD9475
Data Coral~&,&HFFFF7F50
Data Cornflower~&,&HFF9ACEEB
Data CornflowerBlue~&,&HFF6495ED
Data Cornsilk~&,&HFFFFF8DC
Data CottonCandy~&,&HFFFFBCD9
Data CrayolaAquamarine~&,&HFF78DBE2
Data CrayolaBlue~&,&HFF1F75FE
Data CrayolaBlueViolet~&,&HFF7366BD
Data CrayolaBrown~&,&HFFB4674D
Data CrayolaCadetBlue~&,&HFFB0B7C6
Data CrayolaForestGreen~&,&HFF6DAE81
Data CrayolaGold~&,&HFFE7C697
Data CrayolaGoldenrod~&,&HFFFCD975
Data CrayolaGray~&,&HFF95918C
Data CrayolaGreen~&,&HFF1CAC78
Data CrayolaGreenYellow~&,&HFFF0E891
Data CrayolaIndigo~&,&HFF5D76CB
Data CrayolaLavender~&,&HFFFCB4D5
Data CrayolaMagenta~&,&HFFF664AF
Data CrayolaMaroon~&,&HFFC8385A
Data CrayolaMidnightBlue~&,&HFF1A4876
Data CrayolaOrange~&,&HFFFF7538
Data CrayolaOrangeRed~&,&HFFFF2B2B
Data CrayolaOrchid~&,&HFFE6A8D7
Data CrayolaPlum~&,&HFF8E4585
Data CrayolaRed~&,&HFFEE204D
Data CrayolaSalmon~&,&HFFFF9BAA
Data CrayolaSeaGreen~&,&HFF9FE2BF
Data CrayolaSilver~&,&HFFCDC5C2
Data CrayolaSkyBlue~&,&HFF80DAEB
Data CrayolaSpringGreen~&,&HFFECEABE
Data CrayolaTann~&,&HFFFAA76C
Data CrayolaThistle~&,&HFFEBC7DF
Data CrayolaViolet~&,&HFF926EAE
Data CrayolaYellow~&,&HFFFCE883
Data CrayolaYellowGreen~&,&HFFC5E384
Data Crimson~&,&HFFDC143C
Data Cyan~&,&HFF00FFFF
Data Dandelion~&,&HFFFDDB6D
Data DarkBlue~&,&HFF00008B
Data DarkCyan~&,&HFF008B8B
Data DarkGoldenRod~&,&HFFB8860B
Data DarkGray~&,&HFFA9A9A9
Data DarkGreen~&,&HFF006400
Data DarkKhaki~&,&HFFBDB76B
Data DarkMagenta~&,&HFF8B008B
Data DarkOliveGreen~&,&HFF556B2F
Data DarkOrange~&,&HFFFF8C00
Data DarkOrchid~&,&HFF9932CC
Data DarkRed~&,&HFF8B0000
Data DarkSalmon~&,&HFFE9967A
Data DarkSeaGreen~&,&HFF8FBC8F
Data DarkSlateBlue~&,&HFF483D8B
Data DarkSlateGray~&,&HFF2F4F4F
Data DarkTurquoise~&,&HFF00CED1
Data DarkViolet~&,&HFF9400D3
Data DeepPink~&,&HFFFF1493
Data DeepSkyBlue~&,&HFF00BFFF
Data Denim~&,&HFF2B6CC4
Data DesertSand~&,&HFFEFCDB8
Data DimGray~&,&HFF696969
Data DodgerBlue~&,&HFF1E90FF
Data Eggplant~&,&HFF6E5160
Data ElectricLime~&,&HFFCEFF1D
Data Fern~&,&HFF71BC78
Data FireBrick~&,&HFFB22222
Data Floralwhite~&,&HFFFFFAF0
Data ForestGreen~&,&HFF228B22
Data Fuchsia~&,&HFFC364C5
Data FuzzyWuzzy~&,&HFFCC6666
Data Gainsboro~&,&HFFDCDCDC
Data GhostWhite~&,&HFFF8F8FF
Data Gold~&,&HFFFFD700
Data GoldenRod~&,&HFFDAA520
Data GrannySmithApple~&,&HFFA8E4A0
Data Gray~&,&HFF808080
Data Green~&,&HFF008000
Data GreenBlue~&,&HFF1164B4
Data GreenYellow~&,&HFFADFF2F
Data HoneyDew~&,&HFFF0FFF0
Data HotMagenta~&,&HFFFF1DCE
Data HotPink~&,&HFFFF69B4
Data Inchworm~&,&HFFB2EC5D
Data IndianRed~&,&HFFCD5C5C
Data Indigo~&,&HFF4B0082
Data Ivory~&,&HFFFFFFF0
Data JazzberryJam~&,&HFFCA3767
Data JungleGreen~&,&HFF3BB08F
Data Khaki~&,&HFFF0E68C
Data LaserLemon~&,&HFFFEFE22
Data Lavender~&,&HFFE6E6FA
Data LavenderBlush~&,&HFFFFF0F5
Data LawnGreen~&,&HFF7CFC00
Data LemonChiffon~&,&HFFFFFACD
Data LemonYellow~&,&HFFFFF44F
Data LightBlue~&,&HFFADD8E6
Data LightCoral~&,&HFFF08080
Data LightCyan~&,&HFFE0FFFF
Data LightGoldenRodYellow~&,&HFFFAFAD2
Data LightGray~&,&HFFD3D3D3
Data LightGreen~&,&HFF90EE90
Data LightPink~&,&HFFFFB6C1
Data LightSalmon~&,&HFFFFA07A
Data LightSeaGreen~&,&HFF20B2AA
Data LightSkyBlue~&,&HFF87CEFA
Data LightSlateGray~&,&HFF778899
Data LightSteelBlue~&,&HFFB0C4DE
Data LightYellow~&,&HFFFFFFE0
Data Lime~&,&HFF00FF00
Data LimeGreen~&,&HFF32CD32
Data Linen~&,&HFFFAF0E6
Data MacaroniAndCheese~&,&HFFFFBD88
Data Magenta~&,&HFFFF00FF
Data MagicMint~&,&HFFAAF0D1
Data Mahogany~&,&HFFCD4A4C
Data Maize~&,&HFFEDD19C
Data Manatee~&,&HFF979AAA
Data MangoTango~&,&HFFFF8243
Data Maroon~&,&HFF800000
Data Mauvelous~&,&HFFEF98AA
Data MediumAquamarine~&,&HFF66CDAA
Data MediumBlue~&,&HFF0000CD
Data MediumOrchid~&,&HFFBA55D3
Data MediumPurple~&,&HFF9370DB
Data MediumSeaGreen~&,&HFF3CB371
Data MediumSlateBlue~&,&HFF7B68EE
Data MediumSpringGreen~&,&HFF00FA9A
Data MediumTurquoise~&,&HFF48D1CC
Data MediumVioletRed~&,&HFFC71585
Data Melon~&,&HFFFDBCB4
Data MidnightBlue~&,&HFF191970
Data MintCream~&,&HFFF5FFFA
Data MistyRose~&,&HFFFFE4E1
Data Moccasin~&,&HFFFFE4B5
Data MountainMeadow~&,&HFF30BA8F
Data Mulberry~&,&HFFC54B8C
Data NavajoWhite~&,&HFFFFDEAD
Data Navy~&,&HFF000080
Data NavyBlue~&,&HFF1974D2
Data NeonCarrot~&,&HFFFFA343
Data OldLace~&,&HFFFDF5E6
Data Olive~&,&HFF808000
Data OliveDrab~&,&HFF6B8E23
Data OliveGreen~&,&HFFBAB86C
Data Orange~&,&HFFFFA500
Data OrangeRed~&,&HFFFF4500
Data OrangeYellow~&,&HFFF8D568
Data Orchid~&,&HFFDA70D6
Data OuterSpace~&,&HFF414A4C
Data OutrageousOrange~&,&HFFFF6E4A
Data PacificBlue~&,&HFF1CA9C9
Data PaleGoldenRod~&,&HFFEEE8AA
Data PaleGreen~&,&HFF98FB98
Data PaleTurquoise~&,&HFFAFEEEE
Data PaleVioletRed~&,&HFFDB7093
Data PapayaWhip~&,&HFFFFEFD5
Data Peach~&,&HFFFFCFAB
Data PeachPuff~&,&HFFFFDAB9
Data Periwinkle~&,&HFFC5D0E6
Data Peru~&,&HFFCD853F
Data PiggyPink~&,&HFFFDDDE6
Data PineGreen~&,&HFF158078
Data Pink~&,&HFFFFC0CB
Data PinkFlamingo~&,&HFFFC74FD
Data PinkSherbet~&,&HFFF78FA7
Data Plum~&,&HFFDDA0DD
Data PowderBlue~&,&HFFB0E0E6
Data Purple~&,&HFF800080
Data PurpleHeart~&,&HFF7442C8
Data PurpleMountainsMajesty~&,&HFF9D81BA
Data PurplePizzazz~&,&HFFFE4EDA
Data RadicalRed~&,&HFFFF496C
Data RawSienna~&,&HFFD68A59
Data RawUmber~&,&HFF714B23
Data RazzleDazzleRose~&,&HFFFF48D0
Data Razzmatazz~&,&HFFE3256B
Data Red~&,&HFFFF0000
Data RedOrange~&,&HFFFF5349
Data RedViolet~&,&HFFC0448F
Data RobinsEggBlue~&,&HFF1FCECB
Data RosyBrown~&,&HFFBC8F8F
Data RoyalBlue~&,&HFF4169E1
Data RoyalPurple~&,&HFF7851A9
Data SaddleBrown~&,&HFF8B4513
Data Salmon~&,&HFFFA8072
Data SandyBrown~&,&HFFF4A460
Data Scarlet~&,&HFFFC2847
Data ScreaminGreen~&,&HFF76FF7A
Data SeaGreen~&,&HFF2E8B57
Data SeaShell~&,&HFFFFF5EE
Data Sepia~&,&HFFA5694F
Data Shadow~&,&HFF8A795D
Data Shamrock~&,&HFF45CEA2
Data ShockingPink~&,&HFFFB7EFD
Data Sienna~&,&HFFA0522D
Data Silver~&,&HFFC0C0C0
Data SkyBlue~&,&HFF87CEEB
Data SlateBlue~&,&HFF6A5ACD
Data SlateGray~&,&HFF708090
Data Snow~&,&HFFFFFAFA
Data SpringGreen~&,&HFF00FF7F
Data SteelBlue~&,&HFF4682B4
Data Sunglow~&,&HFFFFCF48
Data SunsetOrange~&,&HFFFD5E53
Data Tann~&,&HFFD2B48C
Data Teal~&,&HFF008080
Data TealBlue~&,&HFF18A7B5
Data Thistle~&,&HFFD8BFD8
Data TickleMePink~&,&HFFFC89AC
Data Timberwolf~&,&HFFDBD7D2
Data Tomato~&,&HFFFF6347
Data TropicalRainForest~&,&HFF17806D
Data Tumbleweed~&,&HFFDEAA88
Data Turquoise~&,&HFF40E0D0
Data TurquoiseBlue~&,&HFF77DDE7
Data UnmellowYellow~&,&HFFFFFF66
Data Violet~&,&HFFEE82EE
Data VioletBlue~&,&HFF324AB2
Data VioletRed~&,&HFFF75394
Data VividTangerine~&,&HFFFFA089
Data VividViolet~&,&HFF8F509D
Data Wheat~&,&HFFF5DEB3
Data White~&,&HFFFFFFFF
Data Whitesmoke~&,&HFFF5F5F5
Data WildBlueYonder~&,&HFFA2ADD0
Data WildStrawberry~&,&HFFFF43A4
Data WildWatermelon~&,&HFFFC6C85
Data Wisteria~&,&HFFCDA4DE
Data Yellow~&,&HFFFFFF00
Data YellowGreen~&,&HFF9ACD32
Data YellowOrange~&,&HFFFFAE42

Sub cText (x, y, textHeight, K As _Unsigned Long, txt$)
    Dim fg As _Unsigned Long, cur&, I&, mult, xlen
    fg = _DefaultColor
    'screen snapshot
    cur& = _Dest
    I& = _NewImage(8 * Len(txt$), 16, 32)
    _Dest I&
    Color K, _RGBA32(0, 0, 0, 0)
    _PrintString (0, 0), txt$
    mult = textHeight / 16
    xlen = Len(txt$) * 8 * mult
    _PutImage (x - .5 * xlen, y - .5 * textHeight)-Step(xlen, textHeight), I&, cur&
    Color fg
    _FreeImage I&
End Sub

Sub QSort (Start, Finish) 'sa$ needs to be shared array
    Dim i As Integer, j As Integer, x$, a$
    i = Start
    j = Finish
    x$ = sa$(Int((i + j) / 2))
    While i <= j
        While sa$(i) < x$
            i = i + 1
        Wend
        While sa$(j) > x$
            j = j - 1
        Wend
        If i <= j Then
            a$ = sa$(i)
            sa$(i) = sa$(j)
            sa$(j) = a$
            i = i + 1
            j = j - 1
        End If
    Wend
    If j > Start Then QSort Start, j
    If i < Finish Then QSort i, Finish
End Sub

Apparently we played with this stuff 4 years ago!
b = b + ...
Reply




Users browsing this thread: 2 Guest(s)