Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How do you use PALETTE?

I can't get the hang of how to use PALETTE! Any help would be great. Provide an example please!



Comments

  • : I can't get the hang of how to use PALETTE! Any help would be great. Provide an example please!
    :
    :
    Hi,
    Below is a program to illustrate one way to use PALETTE.


    SCREEN 12
    COLOR 1
    LOCATE 10, 20
    PRINT "This is a TEST."
    WHILE INKEY$ = ""
    FOR x = 1 TO 63
    timerh = TIMER
    WHILE TIMER - timerh < .1
    WEND
    timerh = TIMER
    PALETTE 1, x + (x * 256) + ( x * 65536)
    NEXT x
    WEND

    The three values that are added in the PALETTE line are the RED value, GREEN value * 256 and the
    BLUE value * 65536. The color values range from 0 (none) to 63(MAX color).
    The TIMER stuff is so you can see the changing shades.

    Hope this helps.

    Dick


Sign In or Register to comment.