Announcement

Collapse
No announcement yet.

black & white for Screen 12

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

  • black & white for Screen 12

    Using graphics mode Screen 12, what COLOR foreground,background should I use to get the whitest possible background and the blackest possible foreground? (0,63 gives a nice white background but no foreground.
    Also, does anyone have a full listing of all 1-15 foreground colors and 0 to 63 background colors? My manual doesn't.

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

  • #2
    If I remember correctly
    0 = Black RGB(0,0,0) AND 15 = White RGB(255,255,255) and
    it doesn't get any better than that.

    However, if you're looking for impact then use yellow (14) and black.


    ------------------
    C'ya
    Don
    [email protected]
    C'ya
    Don

    http://www.ImagesBy.me

    Comment


    • #3
      See PALETTE.

      ------------------
      Tom Hanlin, PowerBASIC Staff
      Opinions expressed may not be those of my employer or myself

      Comment


      • #4
        I tried 0 & 15 - see code below. In my falling-apart, much-beloved PB-DOS manual, the writeupt for PALETTE describes how to change it but doesn't actually say what colors are produced!

        screen 12
        COLOR 15,0
        CLS
        LINE (0,0)-(500,500)
        LOCATE 20,1
        INPUT "ENTER TO CONTINUE TEST - NEXT SCREEN SHOULD BE WHITE WITH BLACK LINE",DUM
        COLOR 0,15
        CLS
        LINE (0,0)-(500,500)
        INPUT DUM
        LOCATE 20,1
        COLOR 4,0
        INPUT "I GET A DIRTY WHITE SCREEN WITH NO LINE - HELP!",DUM
        END

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

        Comment


        • #5
          How bout this

          Code:
            SCREEN 12
            Red%=63 : green%=63: Blue%=63
            A&=(65536*Blue%) + (256*green%) + red%
            Palette 7,A&
            Color 7
            For k&=0 to 500
              LINE (0,k&)-(500,k&)
            next k&
            color 0
            Line (0,0)-(500,500)
            while inkey$="":wend

          ------------------
          Client Writeup for the CPA


          mailto:[email protected][email protected]</A>
          Client Writeup for the CPA

          buffs.proboards2.com

          Links Page

          Comment


          • #6
            Fred's code gives black on white, but it shouldn't be necessary to paint the background one line at a time! Surely there is a way to use COLOR and CLS to make a true white background (like on this page) and draw a black line on it.

            Or is there?


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

            Comment


            • #7
              Why not use just a simple LINE instead of CLS to erase the full screen to white?


              screen 12

              line (0,0)-(639,479),15,bf

              for z=0 to 640 step 2

              line (320,480)-(z,0),0

              next z

              while instat=0:wend

              G.


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

              Comment


              • #8
                I had first tried the bf parameter in the line statement actually
                but wasn't getting the bright white so finally resorted to this
                (in response to the initial problem) which is fairly fast.

                I don't do much in dos anymore and didn't use graphics much amyway.
                Mostly business programs where usually I only needed text mode
                screen 0.



                ------------------
                Client Writeup for the CPA


                mailto:[email protected][email protected]</A>
                Client Writeup for the CPA

                buffs.proboards2.com

                Links Page

                Comment


                • #9
                  Fred,

                  just add a line(0,0)-(639,100),15,bf to your code
                  (before the while inkey$ loop) and see, which area is "more"
                  white. I believe, both are same :-)

                  G.

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

                  Comment

                  Working...
                  X