Shop OBEX P1 Docs P2 Docs Learn Events
Selecting Colors — Parallax Forums

Selecting Colors

Kurt FinnieKurt Finnie Posts: 21
edited 2008-06-23 11:14 in Propeller 1
I'm using the TV and Graphics objects to display graphical objects (flags) on my Parallax monitor.
At any given moment, I need red, white, blue and black. At other moments, I need red, yellow, blue and black.

I've read the Ray's logic articles but just don't know where to make appropriate changes.

I tried substituting $F0FC0C00 and $F0F20C00 for $2B060C02 in the Init Colors loop within the Pub Start

repeat i from 0 to 63
  colors[noparse][[/noparse] i ][i] [/i]:= $00001010 * (i+4) & $F + $2B060C02


but this results in diagonal moving lines on-screen.

Can someone get me headed in the right direction?

<colors index inserted by moderator>

Post Edited By Moderator (Paul Baker (Parallax)) : 6/20/2008 8:05:34 PM GMT

Comments

  • RaymanRayman Posts: 14,233
    edited 2008-06-21 13:26
    Each of those long numbers represents 4 colors.· That loop is used to create a gradient in the least significant 2 colors.· Those colors are assigned to rows of tiles to create a color gradient from top to bottom of the screen.
    You might start by just giving the whole screen the same 4 colors:
    [i]repeat i from 0 to 63
      colors[noparse][[/noparse] i ] := $2B060C02[/i]
    

    There are 4 colors in $2B, $06, $0C, and $02.

    You can pick different colors from·the chart·here:

    http://www.rayslogic.com/propeller/Programming/TV_Colors.htm
    ·
  • Kurt FinnieKurt Finnie Posts: 21
    edited 2008-06-23 11:14
    Thanks, this helped a lot. I had been wondering what part of the code created the gradient. Further, I was trying to use the hex numbers for the VGA colors.
Sign In or Register to comment.