Author Topic: Chart Color32.bi  (Read 4895 times)

0 Members and 1 Guest are viewing this topic.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Chart Color32.bi
« on: February 22, 2020, 08:00:36 pm »
Check out the colors and names for $COLOR:32 Metacommand


UPDATE : Warning code below contains a bug when mouse goes off the colors, fixed in following replies (two versions now: Hexadecimal and Decimal color values, Decimal is sorted by value rather than by color name.)



Code: QB64: [Select]
  1. _TITLE "Chart Color32.bi" 'b+ 2020-02-22  for QB64 v1.4 and newer
  2. TYPE ColorConst
  3.     name AS STRING
  4.     value AS STRING
  5. DIM cc(0 TO 269) AS ColorConst
  6. SCREEN _NEWIMAGE(720, 640, 32)
  7. _SCREENMOVE 100, 20
  8. 'load data
  9. FOR i = 0 TO 269
  10.     READ cc(i).name, cc(i).value
  11.     row = INT(i / 18): col = i MOD 18
  12.     LINE (col * 40, row * 40)-STEP(40, 40), VAL(cc(i).value), BF
  13. WHILE _KEYDOWN(27) = 0
  14.     mx = INT(_MOUSEX / 40): my = INT(_MOUSEY / 40)
  15.     LINE (0, 600)-(720, 640), Black~&, BF
  16.     cText 720 / 2 + 2, 620 + 2, 36, Razzmatazz~&, cc(my * 18 + mx).name + ", " + cc(my * 18 + mx).value
  17.     cText 720 / 2, 620, 36, Azure~&, cc(my * 18 + mx).name + ", " + cc(my * 18 + mx).value
  18.     _DISPLAY
  19.     _LIMIT 30
  20. 'Color32.bi as data
  21. DATA AliceBlue~&,&HFFF0F8FF
  22. DATA Almond~&,&HFFEFDECD
  23. DATA AntiqueBrass~&,&HFFCD9575
  24. DATA AntiqueWhite~&,&HFFFAEBD7
  25. DATA Apricot~&,&HFFFDD9B5
  26. DATA Aqua~&,&HFF00FFFF
  27. DATA Aquamarine~&,&HFF7FFFD4
  28. DATA Asparagus~&,&HFF87A96B
  29. DATA AtomicTangerine~&,&HFFFFA474
  30. DATA Azure~&,&HFFF0FFFF
  31. DATA BananaMania~&,&HFFFAE7B5
  32. DATA Beaver~&,&HFF9F8170
  33. DATA Beige~&,&HFFF5F5DC
  34. DATA Bisque~&,&HFFFFE4C4
  35. DATA Bittersweet~&,&HFFFD7C6E
  36. DATA Black~&,&HFF000000
  37. DATA BlanchedAlmond~&,&HFFFFEBCD
  38. DATA BlizzardBlue~&,&HFFACE5EE
  39. DATA Blue~&,&HFF0000FF
  40. DATA BlueBell~&,&HFFA2A2D0
  41. DATA BlueGray~&,&HFF6699CC
  42. DATA BlueGreen~&,&HFF0D98BA
  43. DATA BlueViolet~&,&HFF8A2BE2
  44. DATA Blush~&,&HFFDE5D83
  45. DATA BrickRed~&,&HFFCB4154
  46. DATA Brown~&,&HFFA52A2A
  47. DATA BurlyWood~&,&HFFDEB887
  48. DATA BurntOrange~&,&HFFFF7F49
  49. DATA BurntSienna~&,&HFFEA7E5D
  50. DATA CadetBlue~&,&HFF5F9EA0
  51. DATA Canary~&,&HFFFFFF99
  52. DATA CaribbeanGreen~&,&HFF1CD3A2
  53. DATA CarnationPink~&,&HFFFFAACC
  54. DATA Cerise~&,&HFFDD4492
  55. DATA Cerulean~&,&HFF1DACD6
  56. DATA ChartReuse~&,&HFF7FFF00
  57. DATA Chestnut~&,&HFFBC5D58
  58. DATA Chocolate~&,&HFFD2691E
  59. DATA Copper~&,&HFFDD9475
  60. DATA Coral~&,&HFFFF7F50
  61. DATA Cornflower~&,&HFF9ACEEB
  62. DATA CornflowerBlue~&,&HFF6495ED
  63. DATA Cornsilk~&,&HFFFFF8DC
  64. DATA CottonCandy~&,&HFFFFBCD9
  65. DATA CrayolaAquamarine~&,&HFF78DBE2
  66. DATA CrayolaBlue~&,&HFF1F75FE
  67. DATA CrayolaBlueViolet~&,&HFF7366BD
  68. DATA CrayolaBrown~&,&HFFB4674D
  69. DATA CrayolaCadetBlue~&,&HFFB0B7C6
  70. DATA CrayolaForestGreen~&,&HFF6DAE81
  71. DATA CrayolaGold~&,&HFFE7C697
  72. DATA CrayolaGoldenrod~&,&HFFFCD975
  73. DATA CrayolaGray~&,&HFF95918C
  74. DATA CrayolaGreen~&,&HFF1CAC78
  75. DATA CrayolaGreenYellow~&,&HFFF0E891
  76. DATA CrayolaIndigo~&,&HFF5D76CB
  77. DATA CrayolaLavender~&,&HFFFCB4D5
  78. DATA CrayolaMagenta~&,&HFFF664AF
  79. DATA CrayolaMaroon~&,&HFFC8385A
  80. DATA CrayolaMidnightBlue~&,&HFF1A4876
  81. DATA CrayolaOrange~&,&HFFFF7538
  82. DATA CrayolaOrangeRed~&,&HFFFF2B2B
  83. DATA CrayolaOrchid~&,&HFFE6A8D7
  84. DATA CrayolaPlum~&,&HFF8E4585
  85. DATA CrayolaRed~&,&HFFEE204D
  86. DATA CrayolaSalmon~&,&HFFFF9BAA
  87. DATA CrayolaSeaGreen~&,&HFF9FE2BF
  88. DATA CrayolaSilver~&,&HFFCDC5C2
  89. DATA CrayolaSkyBlue~&,&HFF80DAEB
  90. DATA CrayolaSpringGreen~&,&HFFECEABE
  91. DATA CrayolaTann~&,&HFFFAA76C
  92. DATA CrayolaThistle~&,&HFFEBC7DF
  93. DATA CrayolaViolet~&,&HFF926EAE
  94. DATA CrayolaYellow~&,&HFFFCE883
  95. DATA CrayolaYellowGreen~&,&HFFC5E384
  96. DATA Crimson~&,&HFFDC143C
  97. DATA Cyan~&,&HFF00FFFF
  98. DATA Dandelion~&,&HFFFDDB6D
  99. DATA DarkBlue~&,&HFF00008B
  100. DATA DarkCyan~&,&HFF008B8B
  101. DATA DarkGoldenRod~&,&HFFB8860B
  102. DATA DarkGray~&,&HFFA9A9A9
  103. DATA DarkGreen~&,&HFF006400
  104. DATA DarkKhaki~&,&HFFBDB76B
  105. DATA DarkMagenta~&,&HFF8B008B
  106. DATA DarkOliveGreen~&,&HFF556B2F
  107. DATA DarkOrange~&,&HFFFF8C00
  108. DATA DarkOrchid~&,&HFF9932CC
  109. DATA DarkRed~&,&HFF8B0000
  110. DATA DarkSalmon~&,&HFFE9967A
  111. DATA DarkSeaGreen~&,&HFF8FBC8F
  112. DATA DarkSlateBlue~&,&HFF483D8B
  113. DATA DarkSlateGray~&,&HFF2F4F4F
  114. DATA DarkTurquoise~&,&HFF00CED1
  115. DATA DarkViolet~&,&HFF9400D3
  116. DATA DeepPink~&,&HFFFF1493
  117. DATA DeepSkyBlue~&,&HFF00BFFF
  118. DATA Denim~&,&HFF2B6CC4
  119. DATA DesertSand~&,&HFFEFCDB8
  120. DATA DimGray~&,&HFF696969
  121. DATA DodgerBlue~&,&HFF1E90FF
  122. DATA Eggplant~&,&HFF6E5160
  123. DATA ElectricLime~&,&HFFCEFF1D
  124. DATA Fern~&,&HFF71BC78
  125. DATA FireBrick~&,&HFFB22222
  126. DATA Floralwhite~&,&HFFFFFAF0
  127. DATA ForestGreen~&,&HFF228B22
  128. DATA Fuchsia~&,&HFFC364C5
  129. DATA FuzzyWuzzy~&,&HFFCC6666
  130. DATA Gainsboro~&,&HFFDCDCDC
  131. DATA GhostWhite~&,&HFFF8F8FF
  132. DATA Gold~&,&HFFFFD700
  133. DATA GoldenRod~&,&HFFDAA520
  134. DATA GrannySmithApple~&,&HFFA8E4A0
  135. DATA Gray~&,&HFF808080
  136. DATA Green~&,&HFF008000
  137. DATA GreenBlue~&,&HFF1164B4
  138. DATA GreenYellow~&,&HFFADFF2F
  139. DATA HoneyDew~&,&HFFF0FFF0
  140. DATA HotMagenta~&,&HFFFF1DCE
  141. DATA HotPink~&,&HFFFF69B4
  142. DATA Inchworm~&,&HFFB2EC5D
  143. DATA IndianRed~&,&HFFCD5C5C
  144. DATA Indigo~&,&HFF4B0082
  145. DATA Ivory~&,&HFFFFFFF0
  146. DATA JazzberryJam~&,&HFFCA3767
  147. DATA JungleGreen~&,&HFF3BB08F
  148. DATA Khaki~&,&HFFF0E68C
  149. DATA LaserLemon~&,&HFFFEFE22
  150. DATA Lavender~&,&HFFE6E6FA
  151. DATA LavenderBlush~&,&HFFFFF0F5
  152. DATA LawnGreen~&,&HFF7CFC00
  153. DATA LemonChiffon~&,&HFFFFFACD
  154. DATA LemonYellow~&,&HFFFFF44F
  155. DATA LightBlue~&,&HFFADD8E6
  156. DATA LightCoral~&,&HFFF08080
  157. DATA LightCyan~&,&HFFE0FFFF
  158. DATA LightGoldenRodYellow~&,&HFFFAFAD2
  159. DATA LightGray~&,&HFFD3D3D3
  160. DATA LightGreen~&,&HFF90EE90
  161. DATA LightPink~&,&HFFFFB6C1
  162. DATA LightSalmon~&,&HFFFFA07A
  163. DATA LightSeaGreen~&,&HFF20B2AA
  164. DATA LightSkyBlue~&,&HFF87CEFA
  165. DATA LightSlateGray~&,&HFF778899
  166. DATA LightSteelBlue~&,&HFFB0C4DE
  167. DATA LightYellow~&,&HFFFFFFE0
  168. DATA Lime~&,&HFF00FF00
  169. DATA LimeGreen~&,&HFF32CD32
  170. DATA Linen~&,&HFFFAF0E6
  171. DATA MacaroniAndCheese~&,&HFFFFBD88
  172. DATA Magenta~&,&HFFFF00FF
  173. DATA MagicMint~&,&HFFAAF0D1
  174. DATA Mahogany~&,&HFFCD4A4C
  175. DATA Maize~&,&HFFEDD19C
  176. DATA Manatee~&,&HFF979AAA
  177. DATA MangoTango~&,&HFFFF8243
  178. DATA Maroon~&,&HFF800000
  179. DATA Mauvelous~&,&HFFEF98AA
  180. DATA MediumAquamarine~&,&HFF66CDAA
  181. DATA MediumBlue~&,&HFF0000CD
  182. DATA MediumOrchid~&,&HFFBA55D3
  183. DATA MediumPurple~&,&HFF9370DB
  184. DATA MediumSeaGreen~&,&HFF3CB371
  185. DATA MediumSlateBlue~&,&HFF7B68EE
  186. DATA MediumSpringGreen~&,&HFF00FA9A
  187. DATA MediumTurquoise~&,&HFF48D1CC
  188. DATA MediumVioletRed~&,&HFFC71585
  189. DATA Melon~&,&HFFFDBCB4
  190. DATA MidnightBlue~&,&HFF191970
  191. DATA MintCream~&,&HFFF5FFFA
  192. DATA MistyRose~&,&HFFFFE4E1
  193. DATA Moccasin~&,&HFFFFE4B5
  194. DATA MountainMeadow~&,&HFF30BA8F
  195. DATA Mulberry~&,&HFFC54B8C
  196. DATA NavajoWhite~&,&HFFFFDEAD
  197. DATA Navy~&,&HFF000080
  198. DATA NavyBlue~&,&HFF1974D2
  199. DATA NeonCarrot~&,&HFFFFA343
  200. DATA OldLace~&,&HFFFDF5E6
  201. DATA Olive~&,&HFF808000
  202. DATA OliveDrab~&,&HFF6B8E23
  203. DATA OliveGreen~&,&HFFBAB86C
  204. DATA Orange~&,&HFFFFA500
  205. DATA OrangeRed~&,&HFFFF4500
  206. DATA OrangeYellow~&,&HFFF8D568
  207. DATA Orchid~&,&HFFDA70D6
  208. DATA OuterSpace~&,&HFF414A4C
  209. DATA OutrageousOrange~&,&HFFFF6E4A
  210. DATA PacificBlue~&,&HFF1CA9C9
  211. DATA PaleGoldenRod~&,&HFFEEE8AA
  212. DATA PaleGreen~&,&HFF98FB98
  213. DATA PaleTurquoise~&,&HFFAFEEEE
  214. DATA PaleVioletRed~&,&HFFDB7093
  215. DATA PapayaWhip~&,&HFFFFEFD5
  216. DATA Peach~&,&HFFFFCFAB
  217. DATA PeachPuff~&,&HFFFFDAB9
  218. DATA Periwinkle~&,&HFFC5D0E6
  219. DATA Peru~&,&HFFCD853F
  220. DATA PiggyPink~&,&HFFFDDDE6
  221. DATA PineGreen~&,&HFF158078
  222. DATA Pink~&,&HFFFFC0CB
  223. DATA PinkFlamingo~&,&HFFFC74FD
  224. DATA PinkSherbet~&,&HFFF78FA7
  225. DATA Plum~&,&HFFDDA0DD
  226. DATA PowderBlue~&,&HFFB0E0E6
  227. DATA Purple~&,&HFF800080
  228. DATA PurpleHeart~&,&HFF7442C8
  229. DATA PurpleMountainsMajesty~&,&HFF9D81BA
  230. DATA PurplePizzazz~&,&HFFFE4EDA
  231. DATA RadicalRed~&,&HFFFF496C
  232. DATA RawSienna~&,&HFFD68A59
  233. DATA RawUmber~&,&HFF714B23
  234. DATA RazzleDazzleRose~&,&HFFFF48D0
  235. DATA Razzmatazz~&,&HFFE3256B
  236. DATA Red~&,&HFFFF0000
  237. DATA RedOrange~&,&HFFFF5349
  238. DATA RedViolet~&,&HFFC0448F
  239. DATA RobinsEggBlue~&,&HFF1FCECB
  240. DATA RosyBrown~&,&HFFBC8F8F
  241. DATA RoyalBlue~&,&HFF4169E1
  242. DATA RoyalPurple~&,&HFF7851A9
  243. DATA SaddleBrown~&,&HFF8B4513
  244. DATA Salmon~&,&HFFFA8072
  245. DATA SandyBrown~&,&HFFF4A460
  246. DATA Scarlet~&,&HFFFC2847
  247. DATA ScreaminGreen~&,&HFF76FF7A
  248. DATA SeaGreen~&,&HFF2E8B57
  249. DATA SeaShell~&,&HFFFFF5EE
  250. DATA Sepia~&,&HFFA5694F
  251. DATA Shadow~&,&HFF8A795D
  252. DATA Shamrock~&,&HFF45CEA2
  253. DATA ShockingPink~&,&HFFFB7EFD
  254. DATA Sienna~&,&HFFA0522D
  255. DATA Silver~&,&HFFC0C0C0
  256. DATA SkyBlue~&,&HFF87CEEB
  257. DATA SlateBlue~&,&HFF6A5ACD
  258. DATA SlateGray~&,&HFF708090
  259. DATA Snow~&,&HFFFFFAFA
  260. DATA SpringGreen~&,&HFF00FF7F
  261. DATA SteelBlue~&,&HFF4682B4
  262. DATA Sunglow~&,&HFFFFCF48
  263. DATA SunsetOrange~&,&HFFFD5E53
  264. DATA Tann~&,&HFFD2B48C
  265. DATA Teal~&,&HFF008080
  266. DATA TealBlue~&,&HFF18A7B5
  267. DATA Thistle~&,&HFFD8BFD8
  268. DATA TickleMePink~&,&HFFFC89AC
  269. DATA Timberwolf~&,&HFFDBD7D2
  270. DATA Tomato~&,&HFFFF6347
  271. DATA TropicalRainForest~&,&HFF17806D
  272. DATA Tumbleweed~&,&HFFDEAA88
  273. DATA Turquoise~&,&HFF40E0D0
  274. DATA TurquoiseBlue~&,&HFF77DDE7
  275. DATA UnmellowYellow~&,&HFFFFFF66
  276. DATA Violet~&,&HFFEE82EE
  277. DATA VioletBlue~&,&HFF324AB2
  278. DATA VioletRed~&,&HFFF75394
  279. DATA VividTangerine~&,&HFFFFA089
  280. DATA VividViolet~&,&HFF8F509D
  281. DATA Wheat~&,&HFFF5DEB3
  282. DATA White~&,&HFFFFFFFF
  283. DATA Whitesmoke~&,&HFFF5F5F5
  284. DATA WildBlueYonder~&,&HFFA2ADD0
  285. DATA WildStrawberry~&,&HFFFF43A4
  286. DATA WildWatermelon~&,&HFFFC6C85
  287. DATA Wisteria~&,&HFFCDA4DE
  288. DATA Yellow~&,&HFFFFFF00
  289. DATA YellowGreen~&,&HFF9ACD32
  290. DATA YellowOrange~&,&HFFFFAE42
  291.  
  292. SUB cText (x, y, textHeight, K AS _UNSIGNED LONG, txt$)
  293.     DIM fg AS _UNSIGNED LONG, cur&, I&, mult, xlen
  294.     fg = _DEFAULTCOLOR
  295.     'screen snapshot
  296.     cur& = _DEST
  297.     I& = _NEWIMAGE(8 * LEN(txt$), 16, 32)
  298.     _DEST I&
  299.     COLOR K, _RGBA32(0, 0, 0, 0)
  300.     _PRINTSTRING (0, 0), txt$
  301.     mult = textHeight / 16
  302.     xlen = LEN(txt$) * 8 * mult
  303.     _PUTIMAGE (x - .5 * xlen, y - .5 * textHeight)-STEP(xlen, textHeight), I&, cur&
  304.     COLOR fg
  305.     _FREEIMAGE I&
  306.  
  307.  

« Last Edit: February 23, 2020, 11:35:56 am by bplus »

FellippeHeitor

  • Guest
Re: Chart Color32.bi
« Reply #1 on: February 22, 2020, 08:01:59 pm »
That's very neat, bplus. Thanks for sharing.

Suggestion: make the font "shadow" the same color I'm hovering.

PS: I sometimes get "Subscript out of range" at startup, line 20.
« Last Edit: February 22, 2020, 08:04:03 pm by FellippeHeitor »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Chart Color32.bi
« Reply #2 on: February 22, 2020, 08:03:58 pm »
Thanks Fellippe, I will :)

Oops let's try the opposite color, things can look blurry.
« Last Edit: February 22, 2020, 08:09:17 pm by bplus »

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Chart Color32.bi
« Reply #3 on: February 22, 2020, 08:29:21 pm »
Cool... You are lucky I had QB64 1.4 installed... 1.3 kicked up a fuss in regards to line #2... lol

Nicely done! Is it possible to have the colours in chromatic order?  Nah! Kidding! Just the blue ones will be fine... lol

Logic is the beginning of wisdom.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Chart Color32.bi
« Reply #4 on: February 22, 2020, 08:39:41 pm »
Cool... You are lucky I had QB64 1.4 installed... 1.3 kicked up a fuss in regards to line #2... lol

Nicely done! Is it possible to have the colours in chromatic order?  Nah! Kidding! Just the blue ones will be fine... lol



Hi Johnno,

As a matter of fact I tried a Qsort on the color values just now and it really wasn't much more organized than the harlequin chart originally (but the sort was after I converted to hexadecimal which makes a difference I think). There are like a dozen beige's in there!



Here is the chart with labels in the color moused over and it's opposite as shadow PLUS I discovered an error when mouse goes out of bounds of the array and fixed that.

Code: QB64: [Select]
  1. _TITLE "Chart Color32_bi" 'b+ 2020-02-22  for QB64 v1.4 and newer
  2. TYPE ColorConst
  3.     NAME AS STRING
  4.     value AS STRING
  5. DIM SHARED cc(0 TO 269) AS ColorConst
  6. SCREEN _NEWIMAGE(720, 640, 32)
  7. _SCREENMOVE 100, 20
  8. 'load data
  9. FOR i = 0 TO 269
  10.     READ cc(i).NAME, cc(i).value
  11.     row = INT(i / 18): col = i MOD 18
  12.     LINE (col * 40, row * 40)-STEP(40, 40), VAL(cc(i).value), BF
  13.  
  14. WHILE _KEYDOWN(27) = 0
  15.     mx = INT(_MOUSEX / 40): my = INT(_MOUSEY / 40)
  16.     IF mx >= 0 AND mx <= 18 AND my >= 0 AND my <= 14 THEN
  17.         LINE (0, 600)-(720, 640), Black~&, BF
  18.         oRed = (255 + _RED32(VAL(cc(my * 18 + mx).value)) - 128) MOD 256
  19.         oGrn = (255 + _GREEN32(VAL(cc(my * 18 + mx).value)) - 128) MOD 256
  20.         oBlu = (255 + _BLUE32(VAL(cc(my * 18 + mx).value)) - 128) MOD 256
  21.         cText 720 / 2 + 2, 620 + 2, 40, _RGB32(oRed, oGrn, oBlu), cc(my * 18 + mx).NAME + ", " + cc(my * 18 + mx).value
  22.         cText 720 / 2, 620, 40, VAL(cc(my * 18 + mx).value), cc(my * 18 + mx).NAME + ", " + cc(my * 18 + mx).value
  23.     END IF
  24.     _DISPLAY
  25.     _LIMIT 30
  26. 'Color32.bi as data
  27. DATA AliceBlue~&,&HFFF0F8FF
  28. DATA Almond~&,&HFFEFDECD
  29. DATA AntiqueBrass~&,&HFFCD9575
  30. DATA AntiqueWhite~&,&HFFFAEBD7
  31. DATA Apricot~&,&HFFFDD9B5
  32. DATA Aqua~&,&HFF00FFFF
  33. DATA Aquamarine~&,&HFF7FFFD4
  34. DATA Asparagus~&,&HFF87A96B
  35. DATA AtomicTangerine~&,&HFFFFA474
  36. DATA Azure~&,&HFFF0FFFF
  37. DATA BananaMania~&,&HFFFAE7B5
  38. DATA Beaver~&,&HFF9F8170
  39. DATA Beige~&,&HFFF5F5DC
  40. DATA Bisque~&,&HFFFFE4C4
  41. DATA Bittersweet~&,&HFFFD7C6E
  42. DATA Black~&,&HFF000000
  43. DATA BlanchedAlmond~&,&HFFFFEBCD
  44. DATA BlizzardBlue~&,&HFFACE5EE
  45. DATA Blue~&,&HFF0000FF
  46. DATA BlueBell~&,&HFFA2A2D0
  47. DATA BlueGray~&,&HFF6699CC
  48. DATA BlueGreen~&,&HFF0D98BA
  49. DATA BlueViolet~&,&HFF8A2BE2
  50. DATA Blush~&,&HFFDE5D83
  51. DATA BrickRed~&,&HFFCB4154
  52. DATA Brown~&,&HFFA52A2A
  53. DATA BurlyWood~&,&HFFDEB887
  54. DATA BurntOrange~&,&HFFFF7F49
  55. DATA BurntSienna~&,&HFFEA7E5D
  56. DATA CadetBlue~&,&HFF5F9EA0
  57. DATA Canary~&,&HFFFFFF99
  58. DATA CaribbeanGreen~&,&HFF1CD3A2
  59. DATA CarnationPink~&,&HFFFFAACC
  60. DATA Cerise~&,&HFFDD4492
  61. DATA Cerulean~&,&HFF1DACD6
  62. DATA ChartReuse~&,&HFF7FFF00
  63. DATA Chestnut~&,&HFFBC5D58
  64. DATA Chocolate~&,&HFFD2691E
  65. DATA Copper~&,&HFFDD9475
  66. DATA Coral~&,&HFFFF7F50
  67. DATA Cornflower~&,&HFF9ACEEB
  68. DATA CornflowerBlue~&,&HFF6495ED
  69. DATA Cornsilk~&,&HFFFFF8DC
  70. DATA CottonCandy~&,&HFFFFBCD9
  71. DATA CrayolaAquamarine~&,&HFF78DBE2
  72. DATA CrayolaBlue~&,&HFF1F75FE
  73. DATA CrayolaBlueViolet~&,&HFF7366BD
  74. DATA CrayolaBrown~&,&HFFB4674D
  75. DATA CrayolaCadetBlue~&,&HFFB0B7C6
  76. DATA CrayolaForestGreen~&,&HFF6DAE81
  77. DATA CrayolaGold~&,&HFFE7C697
  78. DATA CrayolaGoldenrod~&,&HFFFCD975
  79. DATA CrayolaGray~&,&HFF95918C
  80. DATA CrayolaGreen~&,&HFF1CAC78
  81. DATA CrayolaGreenYellow~&,&HFFF0E891
  82. DATA CrayolaIndigo~&,&HFF5D76CB
  83. DATA CrayolaLavender~&,&HFFFCB4D5
  84. DATA CrayolaMagenta~&,&HFFF664AF
  85. DATA CrayolaMaroon~&,&HFFC8385A
  86. DATA CrayolaMidnightBlue~&,&HFF1A4876
  87. DATA CrayolaOrange~&,&HFFFF7538
  88. DATA CrayolaOrangeRed~&,&HFFFF2B2B
  89. DATA CrayolaOrchid~&,&HFFE6A8D7
  90. DATA CrayolaPlum~&,&HFF8E4585
  91. DATA CrayolaRed~&,&HFFEE204D
  92. DATA CrayolaSalmon~&,&HFFFF9BAA
  93. DATA CrayolaSeaGreen~&,&HFF9FE2BF
  94. DATA CrayolaSilver~&,&HFFCDC5C2
  95. DATA CrayolaSkyBlue~&,&HFF80DAEB
  96. DATA CrayolaSpringGreen~&,&HFFECEABE
  97. DATA CrayolaTann~&,&HFFFAA76C
  98. DATA CrayolaThistle~&,&HFFEBC7DF
  99. DATA CrayolaViolet~&,&HFF926EAE
  100. DATA CrayolaYellow~&,&HFFFCE883
  101. DATA CrayolaYellowGreen~&,&HFFC5E384
  102. DATA Crimson~&,&HFFDC143C
  103. DATA Cyan~&,&HFF00FFFF
  104. DATA Dandelion~&,&HFFFDDB6D
  105. DATA DarkBlue~&,&HFF00008B
  106. DATA DarkCyan~&,&HFF008B8B
  107. DATA DarkGoldenRod~&,&HFFB8860B
  108. DATA DarkGray~&,&HFFA9A9A9
  109. DATA DarkGreen~&,&HFF006400
  110. DATA DarkKhaki~&,&HFFBDB76B
  111. DATA DarkMagenta~&,&HFF8B008B
  112. DATA DarkOliveGreen~&,&HFF556B2F
  113. DATA DarkOrange~&,&HFFFF8C00
  114. DATA DarkOrchid~&,&HFF9932CC
  115. DATA DarkRed~&,&HFF8B0000
  116. DATA DarkSalmon~&,&HFFE9967A
  117. DATA DarkSeaGreen~&,&HFF8FBC8F
  118. DATA DarkSlateBlue~&,&HFF483D8B
  119. DATA DarkSlateGray~&,&HFF2F4F4F
  120. DATA DarkTurquoise~&,&HFF00CED1
  121. DATA DarkViolet~&,&HFF9400D3
  122. DATA DeepPink~&,&HFFFF1493
  123. DATA DeepSkyBlue~&,&HFF00BFFF
  124. DATA Denim~&,&HFF2B6CC4
  125. DATA DesertSand~&,&HFFEFCDB8
  126. DATA DimGray~&,&HFF696969
  127. DATA DodgerBlue~&,&HFF1E90FF
  128. DATA Eggplant~&,&HFF6E5160
  129. DATA ElectricLime~&,&HFFCEFF1D
  130. DATA Fern~&,&HFF71BC78
  131. DATA FireBrick~&,&HFFB22222
  132. DATA Floralwhite~&,&HFFFFFAF0
  133. DATA ForestGreen~&,&HFF228B22
  134. DATA Fuchsia~&,&HFFC364C5
  135. DATA FuzzyWuzzy~&,&HFFCC6666
  136. DATA Gainsboro~&,&HFFDCDCDC
  137. DATA GhostWhite~&,&HFFF8F8FF
  138. DATA Gold~&,&HFFFFD700
  139. DATA GoldenRod~&,&HFFDAA520
  140. DATA GrannySmithApple~&,&HFFA8E4A0
  141. DATA Gray~&,&HFF808080
  142. DATA Green~&,&HFF008000
  143. DATA GreenBlue~&,&HFF1164B4
  144. DATA GreenYellow~&,&HFFADFF2F
  145. DATA HoneyDew~&,&HFFF0FFF0
  146. DATA HotMagenta~&,&HFFFF1DCE
  147. DATA HotPink~&,&HFFFF69B4
  148. DATA Inchworm~&,&HFFB2EC5D
  149. DATA IndianRed~&,&HFFCD5C5C
  150. DATA Indigo~&,&HFF4B0082
  151. DATA Ivory~&,&HFFFFFFF0
  152. DATA JazzberryJam~&,&HFFCA3767
  153. DATA JungleGreen~&,&HFF3BB08F
  154. DATA Khaki~&,&HFFF0E68C
  155. DATA LaserLemon~&,&HFFFEFE22
  156. DATA Lavender~&,&HFFE6E6FA
  157. DATA LavenderBlush~&,&HFFFFF0F5
  158. DATA LawnGreen~&,&HFF7CFC00
  159. DATA LemonChiffon~&,&HFFFFFACD
  160. DATA LemonYellow~&,&HFFFFF44F
  161. DATA LightBlue~&,&HFFADD8E6
  162. DATA LightCoral~&,&HFFF08080
  163. DATA LightCyan~&,&HFFE0FFFF
  164. DATA LightGoldenRodYellow~&,&HFFFAFAD2
  165. DATA LightGray~&,&HFFD3D3D3
  166. DATA LightGreen~&,&HFF90EE90
  167. DATA LightPink~&,&HFFFFB6C1
  168. DATA LightSalmon~&,&HFFFFA07A
  169. DATA LightSeaGreen~&,&HFF20B2AA
  170. DATA LightSkyBlue~&,&HFF87CEFA
  171. DATA LightSlateGray~&,&HFF778899
  172. DATA LightSteelBlue~&,&HFFB0C4DE
  173. DATA LightYellow~&,&HFFFFFFE0
  174. DATA Lime~&,&HFF00FF00
  175. DATA LimeGreen~&,&HFF32CD32
  176. DATA Linen~&,&HFFFAF0E6
  177. DATA MacaroniAndCheese~&,&HFFFFBD88
  178. DATA Magenta~&,&HFFFF00FF
  179. DATA MagicMint~&,&HFFAAF0D1
  180. DATA Mahogany~&,&HFFCD4A4C
  181. DATA Maize~&,&HFFEDD19C
  182. DATA Manatee~&,&HFF979AAA
  183. DATA MangoTango~&,&HFFFF8243
  184. DATA Maroon~&,&HFF800000
  185. DATA Mauvelous~&,&HFFEF98AA
  186. DATA MediumAquamarine~&,&HFF66CDAA
  187. DATA MediumBlue~&,&HFF0000CD
  188. DATA MediumOrchid~&,&HFFBA55D3
  189. DATA MediumPurple~&,&HFF9370DB
  190. DATA MediumSeaGreen~&,&HFF3CB371
  191. DATA MediumSlateBlue~&,&HFF7B68EE
  192. DATA MediumSpringGreen~&,&HFF00FA9A
  193. DATA MediumTurquoise~&,&HFF48D1CC
  194. DATA MediumVioletRed~&,&HFFC71585
  195. DATA Melon~&,&HFFFDBCB4
  196. DATA MidnightBlue~&,&HFF191970
  197. DATA MintCream~&,&HFFF5FFFA
  198. DATA MistyRose~&,&HFFFFE4E1
  199. DATA Moccasin~&,&HFFFFE4B5
  200. DATA MountainMeadow~&,&HFF30BA8F
  201. DATA Mulberry~&,&HFFC54B8C
  202. DATA NavajoWhite~&,&HFFFFDEAD
  203. DATA Navy~&,&HFF000080
  204. DATA NavyBlue~&,&HFF1974D2
  205. DATA NeonCarrot~&,&HFFFFA343
  206. DATA OldLace~&,&HFFFDF5E6
  207. DATA Olive~&,&HFF808000
  208. DATA OliveDrab~&,&HFF6B8E23
  209. DATA OliveGreen~&,&HFFBAB86C
  210. DATA Orange~&,&HFFFFA500
  211. DATA OrangeRed~&,&HFFFF4500
  212. DATA OrangeYellow~&,&HFFF8D568
  213. DATA Orchid~&,&HFFDA70D6
  214. DATA OuterSpace~&,&HFF414A4C
  215. DATA OutrageousOrange~&,&HFFFF6E4A
  216. DATA PacificBlue~&,&HFF1CA9C9
  217. DATA PaleGoldenRod~&,&HFFEEE8AA
  218. DATA PaleGreen~&,&HFF98FB98
  219. DATA PaleTurquoise~&,&HFFAFEEEE
  220. DATA PaleVioletRed~&,&HFFDB7093
  221. DATA PapayaWhip~&,&HFFFFEFD5
  222. DATA Peach~&,&HFFFFCFAB
  223. DATA PeachPuff~&,&HFFFFDAB9
  224. DATA Periwinkle~&,&HFFC5D0E6
  225. DATA Peru~&,&HFFCD853F
  226. DATA PiggyPink~&,&HFFFDDDE6
  227. DATA PineGreen~&,&HFF158078
  228. DATA Pink~&,&HFFFFC0CB
  229. DATA PinkFlamingo~&,&HFFFC74FD
  230. DATA PinkSherbet~&,&HFFF78FA7
  231. DATA Plum~&,&HFFDDA0DD
  232. DATA PowderBlue~&,&HFFB0E0E6
  233. DATA Purple~&,&HFF800080
  234. DATA PurpleHeart~&,&HFF7442C8
  235. DATA PurpleMountainsMajesty~&,&HFF9D81BA
  236. DATA PurplePizzazz~&,&HFFFE4EDA
  237. DATA RadicalRed~&,&HFFFF496C
  238. DATA RawSienna~&,&HFFD68A59
  239. DATA RawUmber~&,&HFF714B23
  240. DATA RazzleDazzleRose~&,&HFFFF48D0
  241. DATA Razzmatazz~&,&HFFE3256B
  242. DATA Red~&,&HFFFF0000
  243. DATA RedOrange~&,&HFFFF5349
  244. DATA RedViolet~&,&HFFC0448F
  245. DATA RobinsEggBlue~&,&HFF1FCECB
  246. DATA RosyBrown~&,&HFFBC8F8F
  247. DATA RoyalBlue~&,&HFF4169E1
  248. DATA RoyalPurple~&,&HFF7851A9
  249. DATA SaddleBrown~&,&HFF8B4513
  250. DATA Salmon~&,&HFFFA8072
  251. DATA SandyBrown~&,&HFFF4A460
  252. DATA Scarlet~&,&HFFFC2847
  253. DATA ScreaminGreen~&,&HFF76FF7A
  254. DATA SeaGreen~&,&HFF2E8B57
  255. DATA SeaShell~&,&HFFFFF5EE
  256. DATA Sepia~&,&HFFA5694F
  257. DATA Shadow~&,&HFF8A795D
  258. DATA Shamrock~&,&HFF45CEA2
  259. DATA ShockingPink~&,&HFFFB7EFD
  260. DATA Sienna~&,&HFFA0522D
  261. DATA Silver~&,&HFFC0C0C0
  262. DATA SkyBlue~&,&HFF87CEEB
  263. DATA SlateBlue~&,&HFF6A5ACD
  264. DATA SlateGray~&,&HFF708090
  265. DATA Snow~&,&HFFFFFAFA
  266. DATA SpringGreen~&,&HFF00FF7F
  267. DATA SteelBlue~&,&HFF4682B4
  268. DATA Sunglow~&,&HFFFFCF48
  269. DATA SunsetOrange~&,&HFFFD5E53
  270. DATA Tann~&,&HFFD2B48C
  271. DATA Teal~&,&HFF008080
  272. DATA TealBlue~&,&HFF18A7B5
  273. DATA Thistle~&,&HFFD8BFD8
  274. DATA TickleMePink~&,&HFFFC89AC
  275. DATA Timberwolf~&,&HFFDBD7D2
  276. DATA Tomato~&,&HFFFF6347
  277. DATA TropicalRainForest~&,&HFF17806D
  278. DATA Tumbleweed~&,&HFFDEAA88
  279. DATA Turquoise~&,&HFF40E0D0
  280. DATA TurquoiseBlue~&,&HFF77DDE7
  281. DATA UnmellowYellow~&,&HFFFFFF66
  282. DATA Violet~&,&HFFEE82EE
  283. DATA VioletBlue~&,&HFF324AB2
  284. DATA VioletRed~&,&HFFF75394
  285. DATA VividTangerine~&,&HFFFFA089
  286. DATA VividViolet~&,&HFF8F509D
  287. DATA Wheat~&,&HFFF5DEB3
  288. DATA White~&,&HFFFFFFFF
  289. DATA Whitesmoke~&,&HFFF5F5F5
  290. DATA WildBlueYonder~&,&HFFA2ADD0
  291. DATA WildStrawberry~&,&HFFFF43A4
  292. DATA WildWatermelon~&,&HFFFC6C85
  293. DATA Wisteria~&,&HFFCDA4DE
  294. DATA Yellow~&,&HFFFFFF00
  295. DATA YellowGreen~&,&HFF9ACD32
  296. DATA YellowOrange~&,&HFFFFAE42
  297.  
  298. SUB cText (x, y, textHeight, K AS _UNSIGNED LONG, txt$)
  299.     DIM fg AS _UNSIGNED LONG, cur&, I&, mult, xlen
  300.     fg = _DEFAULTCOLOR
  301.     'screen snapshot
  302.     cur& = _DEST
  303.     I& = _NEWIMAGE(8 * LEN(txt$), 16, 32)
  304.     _DEST I&
  305.     COLOR K, _RGBA32(0, 0, 0, 0)
  306.     _PRINTSTRING (0, 0), txt$
  307.     mult = textHeight / 16
  308.     xlen = LEN(txt$) * 8 * mult
  309.     _PUTIMAGE (x - .5 * xlen, y - .5 * textHeight)-STEP(xlen, textHeight), I&, cur&
  310.     COLOR fg
  311.     _FREEIMAGE I&
  312.  
  313.  
« Last Edit: February 22, 2020, 08:42:00 pm by bplus »

Offline _vince

  • Seasoned Forum Regular
  • Posts: 422
    • View Profile
Re: Chart Color32.bi
« Reply #5 on: February 22, 2020, 09:09:49 pm »
Here is an interesting related page
https://gitlab.com/adammajewski/color_gradient

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Chart Color32.bi
« Reply #6 on: February 22, 2020, 09:25:09 pm »
Here is an interesting related page
https://gitlab.com/adammajewski/color_gradient

Oh thanks _vince that looks like something I was trying to figure in hsl2rgb thread.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Chart Color32.bi
« Reply #7 on: February 22, 2020, 10:06:56 pm »
Here is the decimal values version of the color values and this time the color values are sorted, did you know Aqua is the same exact color value as Cyan?

Code: QB64: [Select]
  1. _TITLE "Chart Color32_bi Decimal Sorted by Decimal Values" 'b+ 2020-02-22  for QB64 v1.4 and newer
  2. 'this one is sorted by color value ascending as go down and right in chart
  3. ' Did you know Aqua and Cyan have the same color value?!?!?
  4.  
  5. TYPE ColorConst
  6.     NAME AS STRING
  7.     value AS _UNSIGNED LONG
  8. DIM SHARED cc(0 TO 269) AS ColorConst
  9. SCREEN _NEWIMAGE(720, 640, 32)
  10. _SCREENMOVE 100, 20
  11. 'load data
  12. FOR i = 0 TO 269
  13.     READ cc(i).NAME, cc(i).value
  14.     row = INT(i / 18): col = i MOD 18
  15.     LINE (col * 40, row * 40)-STEP(40, 40), cc(i).value, BF
  16. QSort 0, 269
  17. FOR i = 0 TO 269
  18.     row = INT(i / 18): col = i MOD 18
  19.     LINE (col * 40, row * 40)-STEP(40, 40), cc(i).value, BF
  20.  
  21. WHILE _KEYDOWN(27) = 0
  22.     mx = INT(_MOUSEX / 40): my = INT(_MOUSEY / 40)
  23.     IF mx >= 0 AND mx <= 18 AND my >= 0 AND my <= 14 THEN
  24.         LINE (0, 600)-(720, 640), Black~&, BF
  25.         oRed = (255 + _RED32(255 + cc(my * 18 + mx).value) - 128) MOD 256
  26.         oGrn = (255 + _GREEN32(255 + cc(my * 18 + mx).value) - 128) MOD 256
  27.         oBlu = (255 + _BLUE32(255 + cc(my * 18 + mx).value) - 128) MOD 256
  28.         cText 720 / 2 + 2, 620 + 2, 40, _RGB32(oRed, oGrn, oBlu), cc(my * 18 + mx).NAME + "," + STR$(cc(my * 18 + mx).value)
  29.         cText 720 / 2, 620, 40, cc(my * 18 + mx).value, cc(my * 18 + mx).NAME + "," + STR$(cc(my * 18 + mx).value)
  30.     END IF
  31.     _DISPLAY
  32.     _LIMIT 30
  33.  
  34. 'Color32.bi as data
  35. DATA AliceBlue~&,4293982463
  36. DATA Almond~&,4293910221
  37. DATA AntiqueBrass~&,4291663221
  38. DATA AntiqueWhite~&,4294634455
  39. DATA Apricot~&,4294826421
  40. DATA Aqua~&,4278255615
  41. DATA Aquamarine~&,4286578644
  42. DATA Asparagus~&,4287080811
  43. DATA AtomicTangerine~&,4294943860
  44. DATA Azure~&,4293984255
  45. DATA BananaMania~&,4294633397
  46. DATA Beaver~&,4288643440
  47. DATA Beige~&,4294309340
  48. DATA Bisque~&,4294960324
  49. DATA Bittersweet~&,4294802542
  50. DATA Black~&,4278190080
  51. DATA BlanchedAlmond~&,4294962125
  52. DATA BlizzardBlue~&,4289521134
  53. DATA Blue~&,4278190335
  54. DATA BlueBell~&,4288848592
  55. DATA BlueGray~&,4284914124
  56. DATA BlueGreen~&,4279081146
  57. DATA BlueViolet~&,4287245282
  58. DATA Blush~&,4292763011
  59. DATA BrickRed~&,4291510612
  60. DATA Brown~&,4289014314
  61. DATA BurlyWood~&,4292786311
  62. DATA BurntOrange~&,4294934345
  63. DATA BurntSienna~&,4293557853
  64. DATA CadetBlue~&,4284456608
  65. DATA Canary~&,4294967193
  66. DATA CaribbeanGreen~&,4280079266
  67. DATA CarnationPink~&,4294945484
  68. DATA Cerise~&,4292691090
  69. DATA Cerulean~&,4280134870
  70. DATA ChartReuse~&,4286578432
  71. DATA Chestnut~&,4290534744
  72. DATA Chocolate~&,4291979550
  73. DATA Copper~&,4292711541
  74. DATA Coral~&,4294934352
  75. DATA Cornflower~&,4288335595
  76. DATA CornflowerBlue~&,4284782061
  77. DATA Cornsilk~&,4294965468
  78. DATA CottonCandy~&,4294950105
  79. DATA CrayolaAquamarine~&,4286110690
  80. DATA CrayolaBlue~&,4280251902
  81. DATA CrayolaBlueViolet~&,4285753021
  82. DATA CrayolaBrown~&,4290013005
  83. DATA CrayolaCadetBlue~&,4289771462
  84. DATA CrayolaForestGreen~&,4285378177
  85. DATA CrayolaGold~&,4293379735
  86. DATA CrayolaGoldenrod~&,4294760821
  87. DATA CrayolaGray~&,4287992204
  88. DATA CrayolaGreen~&,4280069240
  89. DATA CrayolaGreenYellow~&,4293978257
  90. DATA CrayolaIndigo~&,4284315339
  91. DATA CrayolaLavender~&,4294751445
  92. DATA CrayolaMagenta~&,4294337711
  93. DATA CrayolaMaroon~&,4291311706
  94. DATA CrayolaMidnightBlue~&,4279912566
  95. DATA CrayolaOrange~&,4294931768
  96. DATA CrayolaOrangeRed~&,4294912811
  97. DATA CrayolaOrchid~&,4293306583
  98. DATA CrayolaPlum~&,4287513989
  99. DATA CrayolaRed~&,4293795917
  100. DATA CrayolaSalmon~&,4294941610
  101. DATA CrayolaSeaGreen~&,4288668351
  102. DATA CrayolaSilver~&,4291675586
  103. DATA CrayolaSkyBlue~&,4286634731
  104. DATA CrayolaSpringGreen~&,4293716670
  105. DATA CrayolaTann~&,4294616940
  106. DATA CrayolaThistle~&,4293642207
  107. DATA CrayolaViolet~&,4287786670
  108. DATA CrayolaYellow~&,4294764675
  109. DATA CrayolaYellowGreen~&,4291158916
  110. DATA Crimson~&,4292613180
  111. DATA Cyan~&,4278255615
  112. DATA Dandelion~&,4294826861
  113. DATA DarkBlue~&,4278190219
  114. DATA DarkCyan~&,4278225803
  115. DATA DarkGoldenRod~&,4290283019
  116. DATA DarkGray~&,4289309097
  117. DATA DarkGreen~&,4278215680
  118. DATA DarkKhaki~&,4290623339
  119. DATA DarkMagenta~&,4287299723
  120. DATA DarkOliveGreen~&,4283788079
  121. DATA DarkOrange~&,4294937600
  122. DATA DarkOrchid~&,4288230092
  123. DATA DarkRed~&,4287299584
  124. DATA DarkSalmon~&,4293498490
  125. DATA DarkSeaGreen~&,4287609999
  126. DATA DarkSlateBlue~&,4282924427
  127. DATA DarkSlateGray~&,4281290575
  128. DATA DarkTurquoise~&,4278243025
  129. DATA DarkViolet~&,4287889619
  130. DATA DeepPink~&,4294907027
  131. DATA DeepSkyBlue~&,4278239231
  132. DATA Denim~&,4281035972
  133. DATA DesertSand~&,4293905848
  134. DATA DimGray~&,4285098345
  135. DATA DodgerBlue~&,4280193279
  136. DATA Eggplant~&,4285419872
  137. DATA ElectricLime~&,4291755805
  138. DATA Fern~&,4285643896
  139. DATA FireBrick~&,4289864226
  140. DATA Floralwhite~&,4294966000
  141. DATA ForestGreen~&,4280453922
  142. DATA Fuchsia~&,4290995397
  143. DATA FuzzyWuzzy~&,4291585638
  144. DATA Gainsboro~&,4292664540
  145. DATA GhostWhite~&,4294506751
  146. DATA Gold~&,4294956800
  147. DATA GoldenRod~&,4292519200
  148. DATA GrannySmithApple~&,4289258656
  149. DATA Gray~&,4286611584
  150. DATA Green~&,4278222848
  151. DATA GreenBlue~&,4279329972
  152. DATA GreenYellow~&,4289593135
  153. DATA HoneyDew~&,4293984240
  154. DATA HotMagenta~&,4294909390
  155. DATA HotPink~&,4294928820
  156. DATA Inchworm~&,4289915997
  157. DATA IndianRed~&,4291648604
  158. DATA Indigo~&,4283105410
  159. DATA Ivory~&,4294967280
  160. DATA JazzberryJam~&,4291442535
  161. DATA JungleGreen~&,4282101903
  162. DATA Khaki~&,4293977740
  163. DATA LaserLemon~&,4294901282
  164. DATA Lavender~&,4293322490
  165. DATA LavenderBlush~&,4294963445
  166. DATA LawnGreen~&,4286381056
  167. DATA LemonChiffon~&,4294965965
  168. DATA LemonYellow~&,4294964303
  169. DATA LightBlue~&,4289583334
  170. DATA LightCoral~&,4293951616
  171. DATA LightCyan~&,4292935679
  172. DATA LightGoldenRodYellow~&,4294638290
  173. DATA LightGray~&,4292072403
  174. DATA LightGreen~&,4287688336
  175. DATA LightPink~&,4294948545
  176. DATA LightSalmon~&,4294942842
  177. DATA LightSeaGreen~&,4280332970
  178. DATA LightSkyBlue~&,4287090426
  179. DATA LightSlateGray~&,4286023833
  180. DATA LightSteelBlue~&,4289774814
  181. DATA LightYellow~&,4294967264
  182. DATA Lime~&,4278255360
  183. DATA LimeGreen~&,4281519410
  184. DATA Linen~&,4294635750
  185. DATA MacaroniAndCheese~&,4294950280
  186. DATA Magenta~&,4294902015
  187. DATA MagicMint~&,4289392849
  188. DATA Mahogany~&,4291643980
  189. DATA Maize~&,4293775772
  190. DATA Manatee~&,4288125610
  191. DATA MangoTango~&,4294935107
  192. DATA Maroon~&,4286578688
  193. DATA Mauvelous~&,4293892266
  194. DATA MediumAquamarine~&,4284927402
  195. DATA MediumBlue~&,4278190285
  196. DATA MediumOrchid~&,4290401747
  197. DATA MediumPurple~&,4287852763
  198. DATA MediumSeaGreen~&,4282168177
  199. DATA MediumSlateBlue~&,4286277870
  200. DATA MediumSpringGreen~&,4278254234
  201. DATA MediumTurquoise~&,4282962380
  202. DATA MediumVioletRed~&,4291237253
  203. DATA Melon~&,4294818996
  204. DATA MidnightBlue~&,4279834992
  205. DATA MintCream~&,4294311930
  206. DATA MistyRose~&,4294960353
  207. DATA Moccasin~&,4294960309
  208. DATA MountainMeadow~&,4281383567
  209. DATA Mulberry~&,4291120012
  210. DATA NavajoWhite~&,4294958765
  211. DATA Navy~&,4278190208
  212. DATA NavyBlue~&,4279858386
  213. DATA NeonCarrot~&,4294943555
  214. DATA OldLace~&,4294833638
  215. DATA Olive~&,4286611456
  216. DATA OliveDrab~&,4285238819
  217. DATA OliveGreen~&,4290426988
  218. DATA Orange~&,4294944000
  219. DATA OrangeRed~&,4294919424
  220. DATA OrangeYellow~&,4294497640
  221. DATA Orchid~&,4292505814
  222. DATA OuterSpace~&,4282468940
  223. DATA OutrageousOrange~&,4294929994
  224. DATA PacificBlue~&,4280068553
  225. DATA PaleGoldenRod~&,4293847210
  226. DATA PaleGreen~&,4288215960
  227. DATA PaleTurquoise~&,4289720046
  228. DATA PaleVioletRed~&,4292571283
  229. DATA PapayaWhip~&,4294963157
  230. DATA Peach~&,4294954923
  231. DATA PeachPuff~&,4294957753
  232. DATA Periwinkle~&,4291154150
  233. DATA Peru~&,4291659071
  234. DATA PiggyPink~&,4294827494
  235. DATA PineGreen~&,4279599224
  236. DATA Pink~&,4294951115
  237. DATA PinkFlamingo~&,4294735101
  238. DATA PinkSherbet~&,4294414247
  239. DATA Plum~&,4292714717
  240. DATA PowderBlue~&,4289781990
  241. DATA Purple~&,4286578816
  242. DATA PurpleHeart~&,4285809352
  243. DATA PurpleMountainsMajesty~&,4288512442
  244. DATA PurplePizzazz~&,4294856410
  245. DATA RadicalRed~&,4294920556
  246. DATA RawSienna~&,4292250201
  247. DATA RawUmber~&,4285614883
  248. DATA RazzleDazzleRose~&,4294920400
  249. DATA Razzmatazz~&,4293076331
  250. DATA Red~&,4294901760
  251. DATA RedOrange~&,4294923081
  252. DATA RedViolet~&,4290790543
  253. DATA RobinsEggBlue~&,4280274635
  254. DATA RosyBrown~&,4290547599
  255. DATA RoyalBlue~&,4282477025
  256. DATA RoyalPurple~&,4286075305
  257. DATA SaddleBrown~&,4287317267
  258. DATA Salmon~&,4294606962
  259. DATA SandyBrown~&,4294222944
  260. DATA Scarlet~&,4294715463
  261. DATA ScreaminGreen~&,4285988730
  262. DATA SeaGreen~&,4281240407
  263. DATA SeaShell~&,4294964718
  264. DATA Sepia~&,4289030479
  265. DATA Shadow~&,4287265117
  266. DATA Shamrock~&,4282764962
  267. DATA ShockingPink~&,4294672125
  268. DATA Sienna~&,4288696877
  269. DATA Silver~&,4290822336
  270. DATA SkyBlue~&,4287090411
  271. DATA SlateBlue~&,4285160141
  272. DATA SlateGray~&,4285563024
  273. DATA Snow~&,4294966010
  274. DATA SpringGreen~&,4278255487
  275. DATA SteelBlue~&,4282811060
  276. DATA Sunglow~&,4294954824
  277. DATA SunsetOrange~&,4294794835
  278. DATA Tann~&,4291998860
  279. DATA Teal~&,4278222976
  280. DATA TealBlue~&,4279805877
  281. DATA Thistle~&,4292394968
  282. DATA TickleMePink~&,4294740396
  283. DATA Timberwolf~&,4292597714
  284. DATA Tomato~&,4294927175
  285. DATA TropicalRainForest~&,4279730285
  286. DATA Tumbleweed~&,4292782728
  287. DATA Turquoise~&,4282441936
  288. DATA TurquoiseBlue~&,4286045671
  289. DATA UnmellowYellow~&,4294967142
  290. DATA Violet~&,4293821166
  291. DATA VioletBlue~&,4281486002
  292. DATA VioletRed~&,4294398868
  293. DATA VividTangerine~&,4294942857
  294. DATA VividViolet~&,4287582365
  295. DATA Wheat~&,4294303411
  296. DATA White~&,4294967295
  297. DATA Whitesmoke~&,4294309365
  298. DATA WildBlueYonder~&,4288851408
  299. DATA WildStrawberry~&,4294919076
  300. DATA WildWatermelon~&,4294732933
  301. DATA Wisteria~&,4291667166
  302. DATA Yellow~&,4294967040
  303. DATA YellowGreen~&,4288335154
  304. DATA YellowOrange~&,4294946370
  305.  
  306. SUB cText (x, y, textHeight, K AS _UNSIGNED LONG, txt$)
  307.     DIM fg AS _UNSIGNED LONG, cur&, I&, mult, xlen
  308.     fg = _DEFAULTCOLOR
  309.     'screen snapshot
  310.     cur& = _DEST
  311.     I& = _NEWIMAGE(8 * LEN(txt$), 16, 32)
  312.     _DEST I&
  313.     COLOR K, _RGBA32(0, 0, 0, 0)
  314.     _PRINTSTRING (0, 0), txt$
  315.     mult = textHeight / 16
  316.     xlen = LEN(txt$) * 8 * mult
  317.     _PUTIMAGE (x - .5 * xlen, y - .5 * textHeight)-STEP(xlen, textHeight), I&, cur&
  318.     COLOR fg
  319.     _FREEIMAGE I&
  320.  
  321. SUB QSort (Start, Finish) 'cc needs to be shared array
  322.     i = Start
  323.     j = Finish
  324.     x = cc(INT((i + j) / 2)).value
  325.     WHILE i <= j
  326.         WHILE cc(i).value < x
  327.             i = i + 1
  328.         WEND
  329.         WHILE cc(j).value > x
  330.             j = j - 1
  331.         WEND
  332.         IF i <= j THEN
  333.             SWAP cc(i), cc(j)
  334.             i = i + 1
  335.             j = j - 1
  336.         END IF
  337.     WEND
  338.     IF j > Start THEN QSort Start, j
  339.     IF i < Finish THEN QSort i, Finish
  340.  
  341.  
Chart Color32_bi Decimal version.PNG
* Chart Color32_bi Decimal version.PNG (Filesize: 35.22 KB, Dimensions: 721x671, Views: 163)
« Last Edit: February 23, 2020, 05:44:30 pm by bplus »

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Chart Color32.bi
« Reply #8 on: February 23, 2020, 02:55:52 am »
bplus,

Good move with the "shadows".  Neon Carrot? Who would have guessed?

Nicely done.
Logic is the beginning of wisdom.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Chart Color32.bi
« Reply #9 on: February 23, 2020, 11:50:53 am »
bplus,

Good move with the "shadows".  Neon Carrot? Who would have guessed?

Nicely done.

Thank Fellippe for using color in labeling idea. I see he found and noted the mouse bug while I was fixing the label coloring.

Johnno I'd think you'd like to see Neon Blue, I have that!
Code: QB64: [Select]
  1. _TITLE "Neon Blue" 'b+ 2020-02-23
  2. SCREEN _NEWIMAGE(1200, 200, 32)
  3. WHILE _KEYDOWN(27) = 0
  4.     cText 600, 100, 64, &HFF0000FF, "Hi Johnno!"
  5.     _DELAY RND * .1
  6.     cText 600, 100, 64, &HFFFFFFFF, "Hi Johnno!"
  7.     _DELAY RND * .05
  8.  
  9. 'center the text at x, y with given height and color
  10. SUB cText (x, y, textHeight, K AS _UNSIGNED LONG, txt$)
  11.     DIM fg AS _UNSIGNED LONG, cur&, I&, mult, xlen
  12.     fg = _DEFAULTCOLOR
  13.     'screen snapshot
  14.     cur& = _DEST
  15.     I& = _NEWIMAGE(8 * LEN(txt$), 16, 32)
  16.     _DEST I&
  17.     COLOR K, _RGBA32(0, 0, 0, 0)
  18.     _PRINTSTRING (0, 0), txt$
  19.     mult = textHeight / 16
  20.     xlen = LEN(txt$) * 8 * mult
  21.     _PUTIMAGE (x - .5 * xlen, y - .5 * textHeight)-STEP(xlen, textHeight), I&, cur&
  22.     COLOR fg
  23.     _FREEIMAGE I&
  24.  
  25.  

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Programming isn't difficult, only it's  consuming time and coffee

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Chart Color32.bi
« Reply #11 on: February 23, 2020, 03:54:24 pm »
* Morph Curve Table Ready.zip (Filesize: 34.13 KB, Downloads: 118)

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Chart Color32.bi
« Reply #12 on: February 24, 2020, 09:06:15 am »
@bplus
Thanks for the plate I'm just hungry.
Programming isn't difficult, only it's  consuming time and coffee

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Chart Color32.bi
« Reply #13 on: February 24, 2020, 11:49:28 am »
Oh hey! we have messages and notifications, nice do-dads!

@TempodiBasic
As I recall that was a spaghetti fork.

Next we need a Democrat so Pete will show up with the wine.

@bplus
What member number are you?

19

« Last Edit: February 24, 2020, 04:37:54 pm by bplus »