<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
>
  <channel>
    <title>Oliver Roick</title>
    <description></description>		
    <link>https://oliverroick.net</link>
    <atom:link href="https://oliverroick.net/rss.xml" rel="self" type="application/rss+xml" />
    <lastBuildDate>Wed, 30 Apr 2025 10:34:00 +0000</lastBuildDate>

    
      <item>
        <title>Kelpwatch.org extends to South Africa and Namibia</title>
        <description>&lt;p&gt;&lt;a href=&quot;https://www.nature.org/en-us/newsroom/kelpwatch-expansion/&quot;&gt;Kelpwatch.org expands to the South Africa and Namibia&lt;/a&gt;, showing kelp canopy coverage along coastline over the past 40+ years, derived from continuous Landsat data.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The maps create a continuous historical record that allows researchers and managers to track long-term patterns of kelp growth, loss, and recovery. “Mapping the canopy-forming kelp forests of southern Africa is an exciting opportunity to better understand how environmental conditions influence these vital systems,” says WHOI’s Dr. Henry Houskeeper, a lead scientist for the project. “Testing kelp forest responses to changing water clarity, upwelling intensity, and ocean circulation across the region will provide valuable insights into how kelp forests respond to shifting conditions.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I only played a small role in this project so far, processing the data for the expansion.&lt;/p&gt;
</description>
        <dc:creator>Oliver Roick</dc:creator>
        <pubDate>Wed, 30 Apr 2025 10:34:00 +0000</pubDate>
        <link>https://oliverroick.net/news/2025/kelpwatch-org-extends-to-south-africa-and-namibia</link>
        <guid isPermaLink="true">https://oliverroick.net/news/2025/kelpwatch-org-extends-to-south-africa-and-namibia</guid>
      </item>
    
      <item>
        <title>Relative Absolute Positioning of an Element in CSS</title>
        <description>&lt;p&gt;The post title is a mouthful, but here it goes: It is possible to absolute-position an element relative to the position of the preceding sibling element. You’ll need this for &lt;a href=&quot;https://www.w3.org/WAI/ARIA/apg/patterns/combobox/&quot;&gt;Combobox&lt;/a&gt; implementations to place a list of options underneath an input element.&lt;/p&gt;

&lt;p&gt;If the sibling element preceding the absolutely-positioned element is relatively positioned and the absolutely-positioned element has no &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;top&lt;/code&gt; property, then the absolutely-positioned element will be placed just underneath the preceding sibling element.&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nc&quot;&gt;.parent&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;relative&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nc&quot;&gt;.sibling&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;relative&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nc&quot;&gt;.absolute-position&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;absolute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;parent&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;input&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;sibling&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;ul&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;absolute-position&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    ...
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I think of it this way: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;position: absolute&lt;/code&gt; removes an element from the normal document flow on the page. When the element has no &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;top&lt;/code&gt; property it assumes the same position as if it were part of the normal document flow.&lt;/p&gt;
</description>
        <dc:creator>Oliver Roick</dc:creator>
        <pubDate>Thu, 20 Mar 2025 01:57:00 +0000</pubDate>
        <link>https://oliverroick.net/learnings/2025/relative-absolute-positioning-of- an-element-in-css</link>
        <guid isPermaLink="true">https://oliverroick.net/learnings/2025/relative-absolute-positioning-of- an-element-in-css</guid>
      </item>
    
      <item>
        <title>Setting Colours in Xterm.js</title>
        <description>&lt;p&gt;&lt;a href=&quot;https://xtermjs.org&quot;&gt;Xterm.js&lt;/a&gt; is a JavaScript library that can be used to build terminal-like user interfaces. We use it in &lt;a href=&quot;https://github.com/2i2c-org/jupyterhub-fancy-profiles&quot;&gt;jupyterhub-fancy-profiles&lt;/a&gt; to display the output from the custom-image build process.&lt;/p&gt;

&lt;p&gt;Xterm.js comes with a reasonable set of predefined colours; red for errors, yellow for warnings, and so on. At the same time the colours are static, and when used with a dark background, the contrast between the specified colour and the background is too low, thus rendering the text hard to read.&lt;/p&gt;

&lt;p&gt;Overwriting the default colours in Xterm.js is possible, but it’s not straightforward, especially if you have a web-development background and are used to specifying colours in &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color&quot;&gt;hex&lt;/a&gt; or &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb&quot;&gt;RGB&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Xterm.js, like all terminal implementations, uses &lt;a href=&quot;https://en.wikipedia.org/wiki/ANSI_escape_code&quot;&gt;ANSI escape codes&lt;/a&gt; to alter the colour of a line in terminal. The colours in the Xterm.js theme need to be specified in the same way, using the pattern&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;\x1b[38;2;{red};{green};{blue}m
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Breaking down the sequence:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;\x1b[&lt;/code&gt; is the Control Sequence Introducer, or CSI; it signals that the following sequence should be interpreted as an ANSI escape code,&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;38&lt;/code&gt; signals that we want to change the text colour,&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;2&lt;/code&gt; means we want to provide a 24-bit colour, and&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{red}&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{green}&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{blue}&lt;/code&gt; are the values in each individual channel.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Consequently, the ANSI equivalent to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;color: rgb(248, 113, 133)&lt;/code&gt; in CSS is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;\x1b[38;2;248;113;133m&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To specify custom colours for a Xterm.js instances we alter the theme:&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;term&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Terminal&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;theme&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;red&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;x1b[38;2;248;113;133m&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;green&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;x1b[38;2;134;239;172m&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;yellow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;x1b[38;2;253;224;71m&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;blue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;x1b[38;2;147;197;253m&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;magenta&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;x1b[38;2;249;168;212m&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;cyan&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;x1b[38;2;103;232;249m&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <dc:creator>Oliver Roick</dc:creator>
        <pubDate>Wed, 20 Nov 2024 00:01:00 +0000</pubDate>
        <link>https://oliverroick.net/learnings/2024/setting-colours-in-xterm-js</link>
        <guid isPermaLink="true">https://oliverroick.net/learnings/2024/setting-colours-in-xterm-js</guid>
      </item>
    
  </channel>
</rss>
