Files
2020-05-30 23:42:41 -04:00

328 lines
16 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Color Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset='utf-8'>
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/Color" class="dashAnchor"></a>
<a title="Color Enumeration Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../../index.html">SwiftTerm 1.0 Docs</a> (65% documented)</p>
<p class="header-right"><a href="https://github.com/migueldeicaza/SwiftTerm"><img src="../../img/gh.png"/>View on GitHub</a></p>
<p class="header-right"><a href="dash-feed://https%3A%2F%2Fmigueldeicaza%2Egithub%2Eio%2FSwiftTerm%2Fdocsets%2FSwiftTerm%2Exml"><img src="../../img/dash.png"/>Install in Dash</a></p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../../index.html">SwiftTerm Reference</a>
<img id="carat" src="../../img/carat.png" />
Color Enumeration Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Classes/Color.html">Color</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/HeadlessTerminal.html">HeadlessTerminal</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/LocalProcess.html">LocalProcess</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/LocalProcessTerminalView.html">LocalProcessTerminalView</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/PseudoTerminalHelpers.html">PseudoTerminalHelpers</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Terminal.html">Terminal</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Terminal/MouseMode.html">– MouseMode</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Terminal/WindowManipulationCommand.html">– WindowManipulationCommand</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/TerminalAccessory.html">TerminalAccessory</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/TerminalDebugView.html">TerminalDebugView</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/TerminalView.html">TerminalView</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/TerminalView/Font.html">– Font</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/TerminalView.html">TerminalView</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/TerminalView/Font.html">– Font</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Enums/CursorStyle.html">CursorStyle</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Extensions/TerminalViewDelegate.html">TerminalViewDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Protocols/LocalProcessDelegate.html">LocalProcessDelegate</a>
</li>
<li class="nav-group-task">
<a href="../../Protocols/LocalProcessTerminalViewDelegate.html">LocalProcessTerminalViewDelegate</a>
</li>
<li class="nav-group-task">
<a href="../../Protocols/TerminalDelegate.html">TerminalDelegate</a>
</li>
<li class="nav-group-task">
<a href="../../Protocols/TerminalViewDelegate.html">TerminalViewDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Structs/Attribute.html">Attribute</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/Attribute/Color.html">– Color</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/CharData.html">CharData</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/CharacterStyle.html">CharacterStyle</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/TerminalOptions.html">TerminalOptions</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/TinyAtom.html">TinyAtom</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Typealiases.html">Type Aliases</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Typealiases.html#/s:9SwiftTerm7TTImagea">TTImage</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>Color</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Color</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
<p>The various ways in which the color was expressed</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm9AttributeV5ColorO7ansi256yAEs5UInt8V_tcAEmF"></a>
<a name="//apple_ref/swift/Element/ansi256(code:)" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm9AttributeV5ColorO7ansi256yAEs5UInt8V_tcAEmF">ansi256(code:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This means that the foreground color stores 8 bits of information
for the color (the original ANSI colors, plus a crop of colors
and greys - those defined in Color.setupDefaultAnsiColors and additionally
we reserve two values &ldquo;defaultForeground&rdquo; and &ldquo;defaultBackground&rdquo; that
indicate that the terminal can pick the right values for those.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">ansi256</span><span class="p">(</span><span class="nv">code</span><span class="p">:</span> <span class="kt">UInt8</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L66">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm9AttributeV5ColorO04trueD0yAEs5UInt8V_A2HtcAEmF"></a>
<a name="//apple_ref/swift/Element/trueColor(red:green:blue:)" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm9AttributeV5ColorO04trueD0yAEs5UInt8V_A2HtcAEmF">trueColor(red:<wbr>green:<wbr>blue:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This means that the color has been configured to be a 24-bit true color
and has 8 bits for red, green and blue</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">trueColor</span><span class="p">(</span><span class="nv">red</span><span class="p">:</span> <span class="kt">UInt8</span><span class="p">,</span> <span class="nv">green</span><span class="p">:</span> <span class="kt">UInt8</span><span class="p">,</span> <span class="nv">blue</span><span class="p">:</span> <span class="kt">UInt8</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L70">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm9AttributeV5ColorO07defaultD0yA2EmF"></a>
<a name="//apple_ref/swift/Element/defaultColor" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm9AttributeV5ColorO07defaultD0yA2EmF">defaultColor</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Indicates that the cell uses the default foreground color</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">defaultColor</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L73">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm9AttributeV5ColorO015defaultInvertedD0yA2EmF"></a>
<a name="//apple_ref/swift/Element/defaultInvertedColor" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm9AttributeV5ColorO015defaultInvertedD0yA2EmF">defaultInvertedColor</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Indicates that the cell uses teh default backgrond color (also used as the inverse color)</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">defaultInvertedColor</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L76">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:SQ2eeoiySbx_xtFZ"></a>
<a name="//apple_ref/swift/Method/==(_:_:)" class="dashAnchor"></a>
<a class="token" href="#/s:SQ2eeoiySbx_xtFZ">==(_:<wbr>_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="o">==</span> <span class="p">(</span><span class="nv">lhs</span><span class="p">:</span> <span class="kt">Color</span><span class="p">,</span> <span class="nv">rhs</span><span class="p">:</span> <span class="kt">Color</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Bool</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L78-L92">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2020 <a class="link" href="https://tirania.org/" target="_blank" rel="external">Miguel de Icaza</a>. All rights reserved. (Last updated: 2020-05-30)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>