Color command in screen 12

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
gablea
Newbie
Posts: 2
Joined: Thu May 13, 2010 8:08 am

Color command in screen 12

Post by gablea »

hi all,

can someone advice me how do I control the backgound color of my text in screen 12

when I use Color 7,15 (for while background) I get a Error

and when I use Color 7 I get JUST THE text in the color I want and a back background. how can I make it so the background is the color I want
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Post by burger2227 »

Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
User avatar
bongomeno
Veteran
Posts: 266
Joined: Wed Dec 10, 2008 9:08 am
Location: Arizona
Contact:

Post by bongomeno »

Code: Select all

OUT &H3C8, 0 ' change color attribute 0 (black)
OUT &H3C9, 30 ' red value from 0 to 63
OUT &H3C9, 20 ' green 0 to 63
OUT &H3C9, 10 ' blue 0 to 63
I was thinking about asking the same thing about screen 13. Will this code also work with it? I cannot test it as I am on windows vista atm.

Thanks.
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Post by burger2227 »

SCREEN 13 colors can also be changed using OUT. The BG color is attribute 0 also although there are 256 colors to work with.
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
Post Reply