[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: vDosXy color modes



Reply to note from flash  Wed, 18 Nov 2015 21:55:24
+0100

flash,

> How does this:
>
> rem Cream on Midnight Blue Background colors = (0, 0, 65) (0, 0,
> 57) (210, 0, 0) (198, 153, 117) (129, 17, 17) (0, 129, 221)
> (149, 129, 161) (190, 150, 125) (200, 175, 115) (253, 253, 253)
> (85, 253, 85) (85, 253, 253) (125, 153, 57) (237, 53, 181) (169,
> 169, 253) (253, 253, 253)
>
> relate to this:
>
> ; Text modes MD NM=7
> ...

Good question. As you know, VGA by default gives you 16 (non-flashing
-- no pun intended) colors: eight basic colors -- black, blue, green,
aqua, red, purple, yellow, white (DOS color modes 0-7, XyWrite MoDes
0-7) -- and eight high-intensity versions of the same -- gray, light
blue, light green, light aqua, light red, light purple, light yellow,
bright white (DOS modes 8-F, Xy MoDes 8-15).

vDos, in turn lets you set, in CONFIG.TXT, each of the 16 VGA colors
to any of 256 times 256 times 256, or 16,777,216, RGB values. Once
those 16 values are in place (when vDos loads), you can derive the
foreground (Fg) and background (Bg) color of each of XyWrite's 256
numbered color MoDes, 0-255, as follows: For any numbered MoDe M, the
Fg color is the remainder after dividing M by 16; and the Bg color is
the quotient. In pseudo-code:

Fg = Modulo(M, 16)
Bg = Int(M/16)

In sum, XyWrite gives you each of the 16 foreground colors againt each
of the 16 background colors, for a total of 16 times 16 = 256 MoDes.
(This is true, of course, not only in vDos but in any DOS
environment.)

Now, by default, XyWrite assigns named MoDes (NM, UL, BO, etc.) to
specific numbered MoDes (NM=7, UL=1, BO=15, BU=9, etc.). But you can
reassign those values in a PRinter file (and in Xy4, SETTINGS.DFL,
which is nothing more than a special-purpose PRinter file), with
assignments like:

MD UL=113
MD BU=127
etc., etc.

So there you have it. Once the 16 VGA colors are set, you can predict
the Fg and Bg values of XyWrite's MoDes 0-255, and thence, by
inspecting the loaded PRinter files (if any), the colors associated
with the various named MoDes.

FYI, I'm attaching a screenshot of XyWrite's 256 color modes with no
colors set in CONFIG.TXT and no PRinter file loaded in XyWrite; this
is the default XyWrite color scheme.

--
Carl Distefano
cld@xxxxxxxx

Attachment: COLORTBL.PNG
Description: PNG image