<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=Set.text.attribute</id>
	<title>Set.text.attribute - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=Set.text.attribute"/>
	<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Set.text.attribute&amp;action=history"/>
	<updated>2026-09-22T00:36:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=Set.text.attribute&amp;diff=106975&amp;oldid=prev</id>
		<title>Andrew Branscom at 02:03, 29 March 2026</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Set.text.attribute&amp;diff=106975&amp;oldid=prev"/>
		<updated>2026-03-29T02:03:06Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:03, 28 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l7&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Remarks ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Remarks ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This command sets the foreground and background [[colors]] used by AGI to display text with the &#039;&#039;&#039;[[display]]&#039;&#039;&#039; or &#039;&#039;&#039;[[display.v]]&#039;&#039;&#039; commands to &#039;&#039;&#039;FG&#039;&#039;&#039; and &#039;&#039;&#039;BG&#039;&#039;&#039; respectively. The [[input line]] also uses the foreground and background colors set by this command. The default foreground color is white, and the default background color is black for both the [[graphics screen]] and the [[text screen]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This command sets the foreground and background [[colors]] used by AGI to display text with the &#039;&#039;&#039;[[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;display  Command|&lt;/ins&gt;display]]&#039;&#039;&#039; or &#039;&#039;&#039;[[display.v]]&#039;&#039;&#039; commands to &#039;&#039;&#039;FG&#039;&#039;&#039; and &#039;&#039;&#039;BG&#039;&#039;&#039; respectively. The [[input line]] also uses the foreground and background colors set by this command. The default foreground color is white, and the default background color is black for both the [[graphics screen]] and the [[text screen]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When the [[text screen]] is active, both the background color and the foreground color are displayed according to the values set by the &amp;#039;&amp;#039;&amp;#039;set.text.attribute&amp;#039;&amp;#039;&amp;#039; command. On the [[graphics]] screen, AGI limits the background color to black or white. If the background color is is black, AGI draws text using the set values for background and foreground. If the background color is any value other than black, AGI uses white as the background, and draws text with black foreground (ignoring the set foreground value).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When the [[text screen]] is active, both the background color and the foreground color are displayed according to the values set by the &amp;#039;&amp;#039;&amp;#039;set.text.attribute&amp;#039;&amp;#039;&amp;#039; command. On the [[graphics]] screen, AGI limits the background color to black or white. If the background color is is black, AGI draws text using the set values for background and foreground. If the background color is any value other than black, AGI uses white as the background, and draws text with black foreground (ignoring the set foreground value).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=Set.text.attribute&amp;diff=106974&amp;oldid=prev</id>
		<title>Andrew Branscom: /* See Also */</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Set.text.attribute&amp;diff=106974&amp;oldid=prev"/>
		<updated>2026-03-29T02:01:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;See Also&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:01, 28 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l114&quot;&gt;Line 114:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 114:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== See Also ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== See Also ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Display Commands]]&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br /&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;[[Display &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Command]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Commands]]&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br /&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;nbsp;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:&lt;/ins&gt;Commands]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;AGI &lt;/ins&gt;Commands]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=Set.text.attribute&amp;diff=106973&amp;oldid=prev</id>
		<title>Andrew Branscom: /* Remarks */</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Set.text.attribute&amp;diff=106973&amp;oldid=prev"/>
		<updated>2026-03-29T02:00:06Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Remarks&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:00, 28 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l85&quot;&gt;Line 85:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 85:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Using values for &#039;&#039;&#039;FG&#039;&#039;&#039; and &#039;&#039;&#039;BG&#039;&#039;&#039; greater than 15 will not cause AGI to crash, but may cause unexpected results. AGI uses only the lower nibble (four least significant bits) of each number to determine the actual colors to display. Internally, AGI combines the &#039;&#039;&#039;FG&#039;&#039;&#039; and &#039;&#039;&#039;BG&#039;&#039;&#039; values into a single 8 bit number that is used by the text drawing functions. Because of the way the numbers are combined, it is actually possible to draw black text on non-black backgrounds on the [[graphics]] screen. If &#039;&#039;&#039;FG&#039;&#039;&#039; is greater than 128 and &#039;&#039;&#039;BG&#039;&#039;&#039; is zero, AGI will use the higher nibble (upper four bits) of &#039;&#039;&#039;FG&#039;&#039;&#039; as the background color, and calls to &#039;&#039;&#039;[[display]]&#039;&#039;&#039; and &#039;&#039;&#039;[[display.v]]&#039;&#039;&#039; will draw black text on colored background. Using the &#039;&#039;&#039;[[text.screen]]&#039;&#039;&#039; command when this is the case will also clear the text screen to the &#039;hacked&#039; foreground color.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Using values for &#039;&#039;&#039;FG&#039;&#039;&#039; and &#039;&#039;&#039;BG&#039;&#039;&#039; greater than 15 will not cause AGI to crash, but may cause unexpected results. AGI uses only the lower nibble (four least significant bits) of each number to determine the actual colors to display. Internally, AGI combines the &#039;&#039;&#039;FG&#039;&#039;&#039; and &#039;&#039;&#039;BG&#039;&#039;&#039; values into a single 8 bit number that is used by the text drawing functions. Because of the way the numbers are combined, it is actually possible to draw black text on non-black backgrounds on the [[graphics]] screen. If &#039;&#039;&#039;FG&#039;&#039;&#039; is greater than 128 and &#039;&#039;&#039;BG&#039;&#039;&#039; is zero, AGI will use the higher nibble (upper four bits) of &#039;&#039;&#039;FG&#039;&#039;&#039; as the background color, and calls to &#039;&#039;&#039;[[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;display  Command|&lt;/ins&gt;display]]&#039;&#039;&#039; and &#039;&#039;&#039;[[display.v]]&#039;&#039;&#039; will draw black text on colored background. Using the &#039;&#039;&#039;[[text.screen]]&#039;&#039;&#039; command when this is the case will also clear the text screen to the &#039;hacked&#039; foreground color.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Possible Errors ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Possible Errors ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=Set.text.attribute&amp;diff=71958&amp;oldid=prev</id>
		<title>Andrew Branscom: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Set.text.attribute&amp;diff=71958&amp;oldid=prev"/>
		<updated>2025-02-16T21:05:27Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:05, 16 February 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=Set.text.attribute&amp;diff=71957&amp;oldid=prev</id>
		<title>Andrew Branscom: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Set.text.attribute&amp;diff=71957&amp;oldid=prev"/>
		<updated>2024-06-03T05:14:29Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:14, 3 June 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=Set.text.attribute&amp;diff=71956&amp;oldid=prev</id>
		<title>Andrew Branscom: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Set.text.attribute&amp;diff=71956&amp;oldid=prev"/>
		<updated>2022-01-28T16:19:50Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The &amp;#039;&amp;#039;&amp;#039;set.text.attribute&amp;#039;&amp;#039;&amp;#039; command sets the foreground and background color for the display commands.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
set.text.attribute([[number|byt]] FG, [[number|byt]] BG);&lt;br /&gt;
&lt;br /&gt;
== Remarks ==&lt;br /&gt;
&lt;br /&gt;
This command sets the foreground and background [[colors]] used by AGI to display text with the &amp;#039;&amp;#039;&amp;#039;[[display]]&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;[[display.v]]&amp;#039;&amp;#039;&amp;#039; commands to &amp;#039;&amp;#039;&amp;#039;FG&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;BG&amp;#039;&amp;#039;&amp;#039; respectively. The [[input line]] also uses the foreground and background colors set by this command. The default foreground color is white, and the default background color is black for both the [[graphics screen]] and the [[text screen]].&lt;br /&gt;
&lt;br /&gt;
When the [[text screen]] is active, both the background color and the foreground color are displayed according to the values set by the &amp;#039;&amp;#039;&amp;#039;set.text.attribute&amp;#039;&amp;#039;&amp;#039; command. On the [[graphics]] screen, AGI limits the background color to black or white. If the background color is is black, AGI draws text using the set values for background and foreground. If the background color is any value other than black, AGI uses white as the background, and draws text with black foreground (ignoring the set foreground value).&lt;br /&gt;
&lt;br /&gt;
On the [[Hercules Graphics Card (HGC)]] display, there are only two colors available (black and white). When displaying text (on either screen) if the set foreground value is less than or equal to the set background value, AGI draws black text on a white background, otherwise it draws white text on  black background.&lt;br /&gt;
&lt;br /&gt;
The text screen on a Color Graphics Adapter (CGA) display supports sixteen colors, so it will show all combinations of background and foreground color just like Enhanced Graphics Adapter displays. On the graphics screen, CGA only has four colors, so AGI uses a table to choose foreground text colors when the background is black (if background is not black, AGI uses black foreground on white background, same as EGA displays):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:150px; text-align:center;&amp;quot; | Foreground&amp;lt;br /&amp;gt;Color&lt;br /&gt;
! style=&amp;quot;width:100px; text-align:center;&amp;quot; | CGA-0&lt;br /&gt;
! style=&amp;quot;width:100px; text-align:center;&amp;quot; | CGA-1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:150px; text-align:center;&amp;quot; | 0 (black)&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | black&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | black&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:150px; text-align:center;&amp;quot; | 1 (blue)&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | green&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | cyan&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:150px; text-align:center;&amp;quot; | 2 (green)&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | green&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | cyan&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:150px; text-align:center;&amp;quot; | 3 (cyan)&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | green&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | cyan&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:150px; text-align:center;&amp;quot; | 4 (red)&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | red&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | magenta&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:150px; text-align:center;&amp;quot; | 5 (magenta)&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | red&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | magenta&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:150px; text-align:center;&amp;quot; | 6 (brown)&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | red&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | magenta&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:150px; text-align:center;&amp;quot; | 7 (light gray)&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | brown&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | white&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:150px; text-align:center;&amp;quot; | 8 (dark gray)&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | brown&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | white&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:150px; text-align:center;&amp;quot; | 9 (light blue)&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | green&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | cyan&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:150px; text-align:center;&amp;quot; | 10 (light green)&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | green&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | cyan&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:150px; text-align:center;&amp;quot; | 11 (light cyan)&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | red&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | magenta&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:150px; text-align:center;&amp;quot; | 12 (light red)&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | red&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | magenta&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:150px; text-align:center;&amp;quot; | 13 (light magenta)&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | red&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | magenta&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:150px; text-align:center;&amp;quot; | 14 (yellow)&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | red&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | magenta&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:150px; text-align:center;&amp;quot; | 15 (white)&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | brown&lt;br /&gt;
| style=&amp;quot;width:100px; text-align:center;&amp;quot; | white&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Using values for &amp;#039;&amp;#039;&amp;#039;FG&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;BG&amp;#039;&amp;#039;&amp;#039; greater than 15 will not cause AGI to crash, but may cause unexpected results. AGI uses only the lower nibble (four least significant bits) of each number to determine the actual colors to display. Internally, AGI combines the &amp;#039;&amp;#039;&amp;#039;FG&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;BG&amp;#039;&amp;#039;&amp;#039; values into a single 8 bit number that is used by the text drawing functions. Because of the way the numbers are combined, it is actually possible to draw black text on non-black backgrounds on the [[graphics]] screen. If &amp;#039;&amp;#039;&amp;#039;FG&amp;#039;&amp;#039;&amp;#039; is greater than 128 and &amp;#039;&amp;#039;&amp;#039;BG&amp;#039;&amp;#039;&amp;#039; is zero, AGI will use the higher nibble (upper four bits) of &amp;#039;&amp;#039;&amp;#039;FG&amp;#039;&amp;#039;&amp;#039; as the background color, and calls to &amp;#039;&amp;#039;&amp;#039;[[display]]&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;[[display.v]]&amp;#039;&amp;#039;&amp;#039; will draw black text on colored background. Using the &amp;#039;&amp;#039;&amp;#039;[[text.screen]]&amp;#039;&amp;#039;&amp;#039; command when this is the case will also clear the text screen to the &amp;#039;hacked&amp;#039; foreground color.&lt;br /&gt;
&lt;br /&gt;
== Possible Errors ==&lt;br /&gt;
&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;agi&amp;quot;&amp;gt;&lt;br /&gt;
text.screen();&lt;br /&gt;
set.text.attribute(1, 14);&lt;br /&gt;
display(5, 5, &amp;quot;message text&amp;quot;); [ this will display blue text on a yellow background&lt;br /&gt;
graphics();&lt;br /&gt;
display(5, 5, &amp;quot;message text&amp;quot;); [ on graphics screen this will be black text on white background&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Technical Information ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color: #efefef&amp;quot; width=&amp;quot;200&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Required Interpreter Version:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| width=&amp;quot;175&amp;quot; | Available in all AGI versions.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color: #efefef&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Byte-Code Value:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| 109 (0x6D hex)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Display Commands]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Category:Commands]]&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
</feed>