TIP: Click on subject to list as thread! ANSI
echo: semware
to: All
from: `Sammy Mitchell`
date: 2003-02-28 07:12:26
subject: [TSEPro] Fun with colors (v4 GUI only)

From: "Sammy Mitchell" 
@Date: Thu, 27 Feb 2003 15:42:27 -0500
@Sender: semware-owner{at}sawasdi.apana.org.au



You might give this macro a try...  It will change the base color-set
that TSE Pro uses.
-------------------------cut here---------------------------------
proc c_GUIv4()
    SetSystemInfo(0, 1, 0,0x000000 )    // black
    SetSystemInfo(0, 1, 1,0x800000 )    // blue
    SetSystemInfo(0, 1, 2,0x008000 )    // green
    SetSystemInfo(0, 1, 3,0x808000 )    // cyan
    SetSystemInfo(0, 1, 4,0x000080 )    // red
    SetSystemInfo(0, 1, 5,0x800080 )    // magenta
    SetSystemInfo(0, 1, 6,0x008080 )    // brown
    SetSystemInfo(0, 1, 7,0xc0c0c0 )    // light gray
    SetSystemInfo(0, 1, 8,0x808080 )    // dark gray
    SetSystemInfo(0, 1, 9,0xff0000 )    // light blue
    SetSystemInfo(0, 1,10,0x00ff00 )    // light green
    SetSystemInfo(0, 1,11,0xffff00 )    // light cyan
    SetSystemInfo(0, 1,12,0x0000ff )    // light red
    SetSystemInfo(0, 1,13,0xff00ff )    // light magenta
    SetSystemInfo(0, 1,14,0x00ffff )    // yellow
    SetSystemInfo(0, 1,15,0xffffff )    // white

    SetSystemInfo(0, 2, 0,0x000000 )    // black
    SetSystemInfo(0, 2, 1,0x800000 )    // blue
    SetSystemInfo(0, 2, 2,0x008000 )    // green
    SetSystemInfo(0, 2, 3,0x808000 )    // cyan
    SetSystemInfo(0, 2, 4,0x000080 )    // red
    SetSystemInfo(0, 2, 5,0x800080 )    // magenta
    SetSystemInfo(0, 2, 6,0x008080 )    // brown
    SetSystemInfo(0, 2, 7,0xc0c0c0 )    // light gray
    SetSystemInfo(0, 2, 8,0x808080 )    // dark gray
    SetSystemInfo(0, 2, 9,0xff0000 )    // light blue
    SetSystemInfo(0, 2,10,0x00ff00 )    // light green
    SetSystemInfo(0, 2,11,0xffff00 )    // light cyan
    SetSystemInfo(0, 2,12,0x0000ff )    // light red
    SetSystemInfo(0, 2,13,0xff00ff )    // light magenta
    SetSystemInfo(0, 2,14,0x00ffff )    // yellow
    SetSystemInfo(0, 2,15,0xffffff )    // white
end

proc c_HTML()
    SetSystemInfo(0, 1, 0,0x000000 )    // black
    SetSystemInfo(0, 1, 1,0x8b0000 )    // blue
    SetSystemInfo(0, 1, 2,0x006400 )    // green
    SetSystemInfo(0, 1, 3,0x808000 )    // cyan
    SetSystemInfo(0, 1, 4,0x00008b )    // red
    SetSystemInfo(0, 1, 5,0x8b008b )    // magenta
    SetSystemInfo(0, 1, 6,0x008b8b )    // brown
    SetSystemInfo(0, 1, 7,0xd3d3d3 )    // light gray
    SetSystemInfo(0, 1, 8,0xa9a9a9 )    // dark gray
    SetSystemInfo(0, 1, 9,0xff0000 )    // light blue
    SetSystemInfo(0, 1,10,0x008000 )    // light green
    SetSystemInfo(0, 1,11,0xffff00 )    // light cyan
    SetSystemInfo(0, 1,12,0x0000ff )    // light red
    SetSystemInfo(0, 1,13,0xff00ff )    // light magenta
    SetSystemInfo(0, 1,14,0x00ffff )    // yellow
    SetSystemInfo(0, 1,15,0xffffff )    // white

    SetSystemInfo(0, 2, 0,0x000000 )    // black
    SetSystemInfo(0, 2, 1,0x8b0000 )    // blue
    SetSystemInfo(0, 2, 2,0x006400 )    // green
    SetSystemInfo(0, 2, 3,0x808000 )    // cyan
    SetSystemInfo(0, 2, 4,0x00008b )    // red
    SetSystemInfo(0, 2, 5,0x8b008b )    // magenta
    SetSystemInfo(0, 2, 6,0x008b8b )    // brown
    SetSystemInfo(0, 2, 7,0xd3d3d3 )    // light gray
    SetSystemInfo(0, 2, 8,0xa9a9a9 )    // dark gray
    SetSystemInfo(0, 2, 9,0xff0000 )    // light blue
    SetSystemInfo(0, 2,10,0x008000 )    // light green
    SetSystemInfo(0, 2,11,0xffff00 )    // light cyan
    SetSystemInfo(0, 2,12,0x0000ff )    // light red
    SetSystemInfo(0, 2,13,0xff00ff )    // light magenta
    SetSystemInfo(0, 2,14,0x00ffff )    // yellow
    SetSystemInfo(0, 2,15,0xffffff )    // white
end

proc c_Brite()
    SetSystemInfo(0, 1, 0,0x000000 )    // black
    SetSystemInfo(0, 1, 1,0xa00000 )    // blue
    SetSystemInfo(0, 1, 2,0x00a000 )    // green
    SetSystemInfo(0, 1, 3,0x00a0a0 )    // cyan
    SetSystemInfo(0, 1, 4,0x0000a0 )    // red
    SetSystemInfo(0, 1, 5,0xa000a0 )    // magenta
    SetSystemInfo(0, 1, 6,0x0050a0 )    // brown
    SetSystemInfo(0, 1, 7,0xa0a0a0 )    // light gray
    SetSystemInfo(0, 1, 8,0x505050 )    // dark gray
    SetSystemInfo(0, 1, 9,0xff5050 )    // light blue
    SetSystemInfo(0, 1,10,0x50ff50 )    // light green
    SetSystemInfo(0, 1,11,0xffff50 )    // light cyan
    SetSystemInfo(0, 1,12,0x5050ff )    // light red
    SetSystemInfo(0, 1,13,0xff50ff )    // light magenta
    SetSystemInfo(0, 1,14,0x50ffff )    // yellow
    SetSystemInfo(0, 1,15,0xffffff )    // white

    SetSystemInfo(0, 2, 0,0x000000 )    // black
    SetSystemInfo(0, 2, 1,0xa00000 )    // blue
    SetSystemInfo(0, 2, 2,0x00a000 )    // green
    SetSystemInfo(0, 2, 3,0x00a0a0 )    // cyan
    SetSystemInfo(0, 2, 4,0x0000a0 )    // red
    SetSystemInfo(0, 2, 5,0xa000a0 )    // magenta
    SetSystemInfo(0, 2, 6,0x0050a0 )    // brown
    SetSystemInfo(0, 2, 7,0xa0a0a0 )    // light gray
    SetSystemInfo(0, 2, 8,0x505050 )    // dark gray
    SetSystemInfo(0, 2, 9,0xff5050 )    // light blue
    SetSystemInfo(0, 2,10,0x50ff50 )    // light green
    SetSystemInfo(0, 2,11,0xffff50 )    // light cyan
    SetSystemInfo(0, 2,12,0x5050ff )    // light red
    SetSystemInfo(0, 2,13,0xff50ff )    // light magenta
    SetSystemInfo(0, 2,14,0x50ffff )    // yellow
    SetSystemInfo(0, 2,15,0xffffff )    // white
end

proc c_Dark()
    SetSystemInfo(0, 1, 0,0x000000 )    // black
    SetSystemInfo(0, 1, 1,0x7f0000 )    // blue
    SetSystemInfo(0, 1, 2,0x007f00 )    // green
    SetSystemInfo(0, 1, 3,0x7f7f00 )    // cyan
    SetSystemInfo(0, 1, 4,0x00007f )    // red
    SetSystemInfo(0, 1, 5,0x7f007f )    // magenta
    SetSystemInfo(0, 1, 6,0x007f7f )    // brown
    SetSystemInfo(0, 1, 7,0xbfbfbf )    // light gray
    SetSystemInfo(0, 1, 8,0x7f7f7f )    // dark gray
    SetSystemInfo(0, 1, 9,0xff0000 )    // light blue
    SetSystemInfo(0, 1,10,0x00ff00 )    // light green
    SetSystemInfo(0, 1,11,0xffff00 )    // light cyan
    SetSystemInfo(0, 1,12,0x0000ff )    // light red
    SetSystemInfo(0, 1,13,0xff00ff )    // light magenta
    SetSystemInfo(0, 1,14,0x00ffff )    // yellow
    SetSystemInfo(0, 1,15,0xffffff )    // white

    SetSystemInfo(0, 2, 0,0x000000 )    // black
    SetSystemInfo(0, 2, 1,0x7f0000 )    // blue
    SetSystemInfo(0, 2, 2,0x007f00 )    // green
    SetSystemInfo(0, 2, 3,0x7f7f00 )    // cyan
    SetSystemInfo(0, 2, 4,0x00007f )    // red
    SetSystemInfo(0, 2, 5,0x7f007f )    // magenta
    SetSystemInfo(0, 2, 6,0x007f7f )    // brown
    SetSystemInfo(0, 2, 7,0xbfbfbf )    // light gray
    SetSystemInfo(0, 2, 8,0x7f7f7f )    // dark gray
    SetSystemInfo(0, 2, 9,0xff0000 )    // light blue
    SetSystemInfo(0, 2,10,0x00ff00 )    // light green
    SetSystemInfo(0, 2,11,0xffff00 )    // light cyan
    SetSystemInfo(0, 2,12,0x0000ff )    // light red
    SetSystemInfo(0, 2,13,0xff00ff )    // light magenta
    SetSystemInfo(0, 2,14,0x00ffff )    // yellow
    SetSystemInfo(0, 2,15,0xffffff )    // white
end

proc c_Brite2()
    SetSystemInfo(0, 1, 0,0x000000 )    // black
    SetSystemInfo(0, 1, 1,0xa80000 )    // blue
    SetSystemInfo(0, 1, 2,0x00a800 )    // green
    SetSystemInfo(0, 1, 3,0xa8a800 )    // cyan
    SetSystemInfo(0, 1, 4,0x0000a8 )    // red
    SetSystemInfo(0, 1, 5,0xa800a8 )    // magenta
    SetSystemInfo(0, 1, 6,0x0058a8 )    // brown
    SetSystemInfo(0, 1, 7,0xa8a8a8 )    // light gray
    SetSystemInfo(0, 1, 8,0x585858 )    // dark gray
    SetSystemInfo(0, 1, 9,0xff5858 )    // light blue
    SetSystemInfo(0, 1,10,0x58ff58 )    // light green
    SetSystemInfo(0, 1,11,0xffff58 )    // light cyan
    SetSystemInfo(0, 1,12,0x5858ff )    // light red
    SetSystemInfo(0, 1,13,0xff58ff )    // light magenta
    SetSystemInfo(0, 1,14,0x58ffff )    // yellow
    SetSystemInfo(0, 1,15,0xffffff )    // white

    SetSystemInfo(0, 2, 0,0x000000 )    // black
    SetSystemInfo(0, 2, 1,0xa80000 )    // blue
    SetSystemInfo(0, 2, 2,0x00a800 )    // green
    SetSystemInfo(0, 2, 3,0xa8a800 )    // cyan
    SetSystemInfo(0, 2, 4,0x0000a8 )    // red
    SetSystemInfo(0, 2, 5,0xa800a8 )    // magenta
    SetSystemInfo(0, 2, 6,0x0058a8 )    // brown
    SetSystemInfo(0, 2, 7,0xa8a8a8 )    // light gray
    SetSystemInfo(0, 2, 8,0x585858 )    // dark gray
    SetSystemInfo(0, 2, 9,0xff5858 )    // light blue
    SetSystemInfo(0, 2,10,0x58ff58 )    // light green
    SetSystemInfo(0, 2,11,0xffff58 )    // light cyan
    SetSystemInfo(0, 2,12,0x5858ff )    // light red
    SetSystemInfo(0, 2,13,0xff58ff )    // light magenta
    SetSystemInfo(0, 2,14,0x58ffff )    // yellow
    SetSystemInfo(0, 2,15,0xffffff )    // white
end

proc ColorChart()
    constant xoff = 1, yoff = 1
    integer x, y, attr, kwidth

    BufferVideo()

    kwidth = 4
    PopWinOpen(1, 1, Query(ScreenCols), Query(ScreenRows), 0, "", 0)
    Set(Attr, 0x11)
    ClrScr()
    Window(xoff, yoff, 2 + kwidth * 16, yoff + 16 + 1)
    DrawBox(4, 7)
    FullWindow()
    vGotoxy(1 + xoff, 1 + yoff)
    for y = 0 to 15
        for x = 0 to 15
            attr = (x * 16) + y
            Set(attr, attr)
            PutStr(Format(attr:kwidth:'0':16))
        endfor
        vGotoxy(1 + xoff, y + 2 + yoff)
    endfor

    UnBufferVideo()
end

menu cmenu()
    History
    "&GUI v4 default colors"
    "&HTML (from HTML book)"
    "&Brite"
    "&Dark"
    "Brite&2 (console colors)"
end

proc main()
    ColorChart()
    BufferVideo()
    loop
        Set(X1, 3)
        Set(Y1, 18)
        case cmenu("[ to select  to finish]")
            when 0 break
            when 1 c_GUIv4()
            when 2 c_HTML()
            when 3 c_Brite()
            when 4 c_Dark()
            when 5 c_Brite2()
        endcase
        VirtualToRealScreen()
    endloop
    PopWinClose()   // be sure to close popwin!
    UnBufferVideo()
end
------------------cut
here------------------------------------------------

--
Sammy Mitchell - www.semware.com

--
TSEPro Mailing List
List Maintenance: www.semware.com/html/list.htm



---
[sawasdi.apana.org.au] (3:800/846.13)
* Origin: apana>>>>>fidonet
SEEN-BY: 633/267 270
@PATH: 800/846 1 640/954 774/605 123/500 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.