Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Identifying colour attributes with negative numbers
#2
Oops, I thought that was something that worked with anything related to colours.

That works for the colour attribute specified in PSET, but not with the COLOR statement.

Sample code:

Code: (Select All)
1 SCREEN 13
2 DEFINT A-Z
3 L = (L + 1) AND 255
4 PALETTE L, (255 - L) \ 4
5 IF L = 0 THEN GOTO 6 ELSE GOTO 3
6 FOR ix = 1 TO 399
7 FOR iy = 1 TO 199
8 PSET (ix, iy), ((ix - L) XOR (iy + L)) XOR ((ix + L) XOR (iy - L))
' in the PSET statement above, the formula for the colour parameter does return negative values
9 NEXT iy, ix
10 L = (L + 1) AND 255
11 IF INKEY$ <> "" THEN SCREEN 0 ELSE GOTO 6
Reply


Messages In This Thread
RE: Identifying colour attributes with negative numbers - by CharlieJV - 01-28-2023, 05:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Strings - Numbers Kernelpanic 0 122 01-20-2026, 10:29 PM
Last Post: Kernelpanic
Question using $color:32 colour names mid-program? hskakw 2 227 01-14-2026, 09:30 AM
Last Post: hskakw
  Random Numbers PhilOfPerth 16 1,847 10-19-2025, 10:26 PM
Last Post: Pete
  using pseudo-random numbers for repeatable content - kind of a neat trick madscijr 5 1,048 02-13-2025, 11:12 PM
Last Post: Pete
  random numbers badger 8 1,458 11-08-2024, 02:22 AM
Last Post: DANILIN

Forum Jump:


Users browsing this thread: 1 Guest(s)