Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Colors 8-15, Screen 12, using the palette statement

Status
Not open for further replies.

missouritom

Technical User
Feb 15, 2002
1
US
I am trying to use custom colors in screen mode 12. Palettes 0-7 change but paltetts 8-15 are not changing. However, if I stop the program and use F4 to view the user screen - the colors are correct. Why is this happening, how can I fix it, and will it work better in compiled mode?
 
You don't have to use the PALETTE statement, I know of a way that works much better. (It depends on what type of BASIC you are using, I wrote this in QBASIC)
use this code:

OUT &H3C8, i&
OUT &H3C9, r&
OUT &H3C9, g&
OUT &H3C9, b&

i& is the colour number, r&, g&, and b& are the intensity of the red green and blue parts of the colour.
This works faster, is more costomizable, and more precise than PALETTE
 
When you edit the Screen-Palettes, Qbasci trys to replace the old colors. You can try it with the Palette and then CLS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top