Post Reply 
Colors in RECT_P(RRGGBB); [Red Green Blue]
02-15-2014, 10:59 AM
Post: #1
Colors in RECT_P(RRGGBB); [Red Green Blue]
What is described on pages 541 and 542 of the User's Guide works fine on the emulated Prime.

That is, you can program RECT_P(FF0000); [page 542] and get a bright red rectangle displayed on the emulated Prime.

The same line on the real Prime gives you a syntax error because of the 'FF' [RR].

Does anyone know the way to specify the color on the real Prime?

If so, where is this documented?

Thanks in advance for any help.

Happy coding and may you see ' i No errors in the program ' with every compilation.
Find all posts by this user
Quote this message in a reply
02-15-2014, 11:38 AM (This post was last modified: 02-16-2014 03:07 PM by Damien.)
Post: #2
RE: Colors in RECT_P(RRGGBB); [Red Green Blue]
Hi,
Are you in HEXADECIMAL on your Prime ? (look at your home settings)
You have to enter the color like that (for HEXA): RECT_P(#RRGGBBh),
with RR,GG,RR from 00h to FFh.
# is a prefix which tells that you are using a binary integer.
h is the suffix of the base used for the binary integer (h for hexadecimal, d for decimal, b for binary, o for octal).

Regards,

Damien.
Find all posts by this user
Quote this message in a reply
02-15-2014, 10:11 PM (This post was last modified: 02-15-2014 10:14 PM by veeblefester.)
Post: #3
RE: Colors in RECT_P(RRGGBB); [Red Green Blue]
Many thanks to Damien.

I was in decimal.

I feel like such a dunce.

Happy coding and may you see ' i No errors in the program ' with every compilation.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)