Announcement

Collapse

Maintenance

The forum could be offline for 30-60 minutes in the very near future for maintenance (said 3pm Pacific). I was behind on getting this notice. I do apologize.
See more
See less

COLOR inquiry

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • COLOR inquiry

    Hi

    Recently, I noticed that you can't use BLACK as a foreground
    color when using SCREEN 12. Why?

    Fred K

    ------------------

  • #2
    Actually, the black designator (0) does not work for the foreground
    color with any background color spedified for graphics mode SCREEN
    12. Some of the other foreground and background color combinations
    aren't too swift either.

    I tried to find out more in the PB documentation and performing an
    online search, but found nothing that would help. What comments I
    could find tended to suggest that SCREEN 12 has access to 16 colors
    from a pallette of 64. Sombody may have decided that a transparent
    color would be more useful than black. Whether there is a way to
    overwrite the pallette selections was not indicated.

    SCREEN 12 imposes VGA limitations on your graphics code, so you can
    see that it is pretty dated. There is also a Mode 13 and a Mode X,
    but in all probability you would be better served if you search the
    web for extended graphics libraries that would give you added
    features and functionality as well.

    ------------------
    Old Navy Chief, Systems Engineer, Systems Analyst, now semi-retired

    Comment


    • #3
      You must first use the PALETTE statement.
      I don't know the technical reason for this.
      The following code produces black text on red :

      SCREEN 12
      PALETTE 1,0
      COLOR 1,12
      CLS
      PRINT "PowerBasic"

      ------------------

      Comment

      Working...
      X