QBASIC _PALETTECOLOR problems - qbasic

Im trying to change the color of the console (WHICH IS POSSIBLE!) with this code:
COLOR 7
PRINT "Color 7 is gray"
K$ = INPUT$(1)
_PALETTECOLOR 7, &HFFDAA520 ' FF alpha makes the color translucent
PRINT "Color 7 is now Goldenrod in SCREEN 0!
However when running it, I get an error Message. Not to mention that the color doesn't change.
What is the proper way to do this?
The code:
http://www.qb64.net/wiki/index.php?title=COLOR

Sorry bout the commotion.
Chrono answered this question.
You have to run it with QB64, not QBASIC. This code works for QB64, not QBASIC.
:(

Related

How can I disable this lines in VSCode

How can I disable these orange & blue lines that are under my code on line 3 & 4? It's a mess when there is a lot of code.
Image
This is most probably "editor.guides.bracketPairsHorizontal".
See if this setting exists in your settings.json; if it's there, it's probably set to true.
You can set it to "active" to only show up for the scope where your caret is or to false to never show at all.

Why my vscode some key-words is gray color?

In VS Code, some of my code is being highlighted grey, while the rest looks as expected
The bellow picture class and def color is gray, the rest looks find though.
Looks like if there’s an error in lines 14 or 15.
Syntax highlighting after an error stops working.

Space displays strangely in VSCode, how to fix it?

enter image description here
I'm using VSCode in version 1.36, the space displays in it looks so strange, the width of 4 space equals to 2 characters. I don't know whether it's a feature in this new version or a bug, since I couldn't find the setting of recovering it to normal. How to set the space equal to one character in this version or it's exactly a bug?
I've found what the problem is. Resetting the "editor.fontFamily": "monospace". See this issue
reference.

Xcode + swift + Darwin.ncurses = "A_BOLD not found" compilation error. I can't get bright colors

I'm creating a silly utility under XCode 10.2.1, with a swift + ncurses template.
The compilation environment seems amazingly easy to setup:
1.- You import some Darwin.ncurses at the beginning of your main.swift file
2.- You start to invoke the typical ncurses primitives (to create some "color brushes")
3.- You addstrings to the ncurses canvas and your text appears happily rendered.
So far so good, but I need something more than the 8 dark colors my Darwin.ncurses apparently gives. I googled a bit and then I discovered I should emit the "A_BOLD" attribute to my "ncurses attribute manager"™ besides my color brush.
Ok then, that's what I did right before printing my texts, using variations of this instruction:
attron(A_BOLD)
What happened next? Xcode complains (at compilation time) with a "I have no idea what's an A_BOLD".
Apparently all other people with doubts about ncurses complain about their terminals not being able to render bright/bold colors (as their terminals are normally configured wrongly for bright colors). But my terminal IS configured ok.
My problem is at compilation time and I have not the slightest idea about what to do, and what to change to render pure white letters.
All other people seem to be able to compile their ncurses code using the (apparently standard) A_BOLD attribute, why can't I? Is there a different/better Darwin.ncurses alternative which I should use instead?
Thanks.
PS: Here I've added some code snippet so you can see how my code makes Xcode choke:
import Foundation
import Darwin.ncurses
initscr()
start_color()
noecho() // Turn on noecho, though it doesn't matter in this example
curs_set(1) // 0 is invisible, 1 is visible, 2 is very visible
init_pair(1, Int16(COLOR_WHITE), Int16(COLOR_BLUE) )
init_pair(2, Int16(COLOR_WHITE), Int16(COLOR_GREEN) )
move(0, 0)
attron(COLOR_PAIR(1))
addstr("text 1")
attroff(COLOR_PAIR(1))
// nice text appears on screen (with dark dull color palette)
move(2, 0)
attron(COLOR_PAIR(2))
addstr("text 2")
attroff(COLOR_PAIR(2))
// nice text appears below (with dark dull color palette also)
attron(A_BOLD) // <-- THIS line is the one complaining
addstr("text 3")
attroff(A_BOLD) // <-- THIS line is also complaining
attron(COLOR_PAIR(2)|A_BOLD) // <-- THIS line is also complaining
addstr("text 4")
attroff(COLOR_PAIR(2)|A_BOLD) // <-- THIS line is also complaining
refresh()

Change VSCode Error font color in terminal

I couldn't find a solution so I ask a new question for this.
I need to change the color of my error messages in visual studio code.
The problem is that the text color of the error message doesn't have enough contrast. Unfortunately I can't find out what I need to change in my settings.json. I was looking for something like:
"workbench.colorCustomizations" : {
"terminalCursor.errorColorFont" : "#ffffff"
}
Thanks for your help!
Same problem here. This worked for me.
"workbench.colorCustomizations" : {
"terminal.ansiRed": "#f88"
}
The following setting helped me:
Terminal › Integrated: Minimum Contrast Ratio
When set the foreground color of each cell will change to try meet the
contrast ratio specified. Example values:
1: The default, do nothing.
4.5: WCAG AA compliance (minimum).
7: WCAG AAA compliance (enhanced).
21: White on black or black on white.
I changed the value to 7 and the dark red became a coral color with good contrast. The advantage of this is it will also apply to other low-contrast background/foreground combinations.
The best solution to this problem is go to settings type "color custo" go to appearance select settings.json file under "workbench.colorCustomizations" paste the following key : value as shown
//"terminal.background":"#000000",
"terminal.foreground":"#10e92d",
"terminalCursor.background ":"#E0E0E0",
"terminalCursor.foreground":"#E0E0E0",
"terminal.ansiBlack":"#000000",
"terminal.ansiBlue":"#6FB3D2",
"terminal.ansiBrightBlack":"#e41c1c",
"terminal.ansiBrightBlue":"#6FB3D2",
"terminal.ansiBrightCyan":"#76C7B7",
"terminal.ansiBrightGreen":"#A1C659",
"terminal.ansiBrightMagenta":"#D381C3",
"terminal.ansiBrightRed":"#FB0120",
"terminal.ansiBrightWhite":"#FFFFFF",
"terminal.ansiBrightYellow":"#FDA331",
"terminal.ansiCyan":"#76C7B7",
"terminal.ansiGreen":"#A1C659",
"terminal.ansiMagenta":"#D381C3",
"terminal.ansiRed":"#FB0120",
"terminal.ansiWhite":"#E0E0E0",
"terminal.ansiYellow":"#FDA331"
I hope this will meet your requirements.