Author Topic: How change default colors for SCREEN _NEWIMAGE (800,600,32) ? SOLVED  (Read 3336 times)

0 Members and 1 Guest are viewing this topic.

Offline acjacques

  • Newbie
  • Posts: 33
    • View Profile
How  change default foreground and background colors for  text  and graphics 

with SCREEN _NEWIMAGE (800,600,32)  ?

I have tried 

COLOR 14, 0

and _PALETTECOLOR 

but doesn't work. Just a black screen .

Works with
SCREEN 12   

but not with _NEWIMAGE






« Last Edit: October 28, 2019, 01:04:45 pm by acjacques »

Marked as best answer by acjacques on October 28, 2019, 09:05:00 am

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: How change default colors for SCREEN _NEWIMAGE (800,600,32) ?
« Reply #1 on: October 28, 2019, 12:23:37 am »
The 32 in _NEWIMAGE(Width, Height, 32) means you are in the land of _RGB32(red, green, blue) colors.

Red, green, blue run from 0 to 255,

_RGB32(255, 0, 0) = color #12 in 0-15 color numbers, yellow _RGB32(255, 255, 0) see _RGB32() for more.

Another way to command colors in 32 bit color mode is Hexidecimal &H FF FF FF FF
the first 2 FF are alpha or transparency FF is fully opaque 0 is fully transparent
the next 2 FF are red levels
the next 2 FF are green levels
the next 2 FF are blue


_NEWIMAGE has many screen modes other than 32, you might like 12 with 256 colors (if read the help file correctly)
« Last Edit: October 28, 2019, 01:02:13 am by bplus »

Offline acjacques

  • Newbie
  • Posts: 33
    • View Profile
Re: How change default colors for SCREEN _NEWIMAGE (800,600,32) ?
« Reply #2 on: October 28, 2019, 12:59:23 pm »
Thanks

now this works

COLOR (_RGB32(255, 255, 0)) 'yellow color foreground   

and for background color ?

Offline acjacques

  • Newbie
  • Posts: 33
    • View Profile
Re: How change default colors for SCREEN _NEWIMAGE (800,600,32) ? SOLVED
« Reply #3 on: October 28, 2019, 01:03:57 pm »
OK Thanks .

SOLVED

COLOR _RGB32(255, 255, 0), _RGB32(255, 0, 255) ' first term is color foreground , second is for background
« Last Edit: October 28, 2019, 01:07:50 pm by acjacques »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: How change default colors for SCREEN _NEWIMAGE (800,600,32) ? SOLVED
« Reply #4 on: October 28, 2019, 01:14:44 pm »
:) good!