<?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/">
  <channel>
    <title>DEV Community: Dev Bhamaria</title>
    <description>The latest articles on DEV Community by Dev Bhamaria (@burthcer).</description>
    <link>https://dev.to/burthcer</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4177053%2Fc46d8c43-4682-4397-a1d7-2299eb829ee1.png</url>
      <title>DEV Community: Dev Bhamaria</title>
      <link>https://dev.to/burthcer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/burthcer"/>
    <language>en</language>
    <item>
      <title>Samsung Internet's dark mode turned my orange buttons dark red. My fix is only partial.</title>
      <dc:creator>Dev Bhamaria</dc:creator>
      <pubDate>Wed, 14 Oct 2026 13:30:00 +0000</pubDate>
      <link>https://dev.to/burthcer/samsung-internets-dark-mode-turned-my-orange-buttons-dark-red-my-fix-is-only-partial-4f3k</link>
      <guid>https://dev.to/burthcer/samsung-internets-dark-mode-turned-my-orange-buttons-dark-red-my-fix-is-only-partial-4f3k</guid>
      <description>&lt;p&gt;My portfolio uses one accent colour: orange, &lt;code&gt;#ff5714&lt;/code&gt;, which is RGB 255, 87, 20. On a friend's phone the orange buttons showed up dark red.&lt;/p&gt;

&lt;p&gt;I first noticed it when a friend sent me a screenshot. Then I tested it on my own phone and saw the same thing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpsgoxad8lekxfrxw304d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpsgoxad8lekxfrxw304d.png" alt="Friend's phone in Samsung Internet: the orange buttons on my old site are dark red" width="738" height="1354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The cause was Samsung Internet's dark mode for web pages (that is the name I know it by). I only saw it in Samsung Internet on phones. I did not see it on PC browsers. My page already says it is dark (&lt;code&gt;color-scheme: dark&lt;/code&gt; in the CSS and a &lt;code&gt;color-scheme&lt;/code&gt; meta tag), and the browser still changed the colours.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I tested
&lt;/h2&gt;

&lt;p&gt;I made a test page that paints the same orange eight ways and opened it on my phone (Samsung Internet 30.0, which reports Chromium 143). I measured the colours from screenshots.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fclyg2ume7z2obb7ggiy3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fclyg2ume7z2obb7ggiy3.png" alt="Test page on my phone: the same orange painted eight ways; only the small image tile, the text and the canvas stay orange" width="800" height="1419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;How the orange was painted&lt;/th&gt;
&lt;th&gt;Intended&lt;/th&gt;
&lt;th&gt;Seen on my phone&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Plain CSS fill&lt;/td&gt;
&lt;td&gt;255, 87, 20&lt;/td&gt;
&lt;td&gt;143, 0, 2 (dark red)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CSS gradient&lt;/td&gt;
&lt;td&gt;255, 87, 20&lt;/td&gt;
&lt;td&gt;72, 0, 2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Inline SVG&lt;/td&gt;
&lt;td&gt;255, 87, 20&lt;/td&gt;
&lt;td&gt;183, 12, 3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Box shadow or border&lt;/td&gt;
&lt;td&gt;255, 87, 20&lt;/td&gt;
&lt;td&gt;204, 34, 1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Image stretched to fit&lt;/td&gt;
&lt;td&gt;255, 87, 20&lt;/td&gt;
&lt;td&gt;91, 10, 4 up to 129, 43, 13&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Small image tile at natural size&lt;/td&gt;
&lt;td&gt;255, 87, 20&lt;/td&gt;
&lt;td&gt;255, 110, 42&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Canvas&lt;/td&gt;
&lt;td&gt;255, 87, 20&lt;/td&gt;
&lt;td&gt;255, 86, 21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Orange text&lt;/td&gt;
&lt;td&gt;255, 87, 20&lt;/td&gt;
&lt;td&gt;255, 119, 53&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Form6pulj9ppzo1lw9g6p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Form6pulj9ppzo1lw9g6p.png" alt="Chart of the measured colours compared with the intended orange" width="799" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Only the canvas came out right. A small, unscaled image tile came out close.&lt;/p&gt;

&lt;p&gt;Things I tried that did nothing: &lt;code&gt;color-scheme: light&lt;/code&gt; on the element, &lt;code&gt;forced-color-adjust: none&lt;/code&gt;, &lt;code&gt;isolation: isolate&lt;/code&gt; with &lt;code&gt;will-change: transform&lt;/code&gt;, &lt;code&gt;print-color-adjust: exact&lt;/code&gt;, a &lt;code&gt;color-scheme&lt;/code&gt; meta tag with both values, and &lt;code&gt;prefers-color-scheme&lt;/code&gt; media queries. The phone also told the page that dark mode was not on, and still changed the colours.&lt;/p&gt;

&lt;p&gt;I don't know Samsung's actual algorithm and couldn't find documentation for it. The table is a pattern from my tests, not a proof.&lt;/p&gt;

&lt;p&gt;I also tried Chromium's own forced dark mode on desktop (Edge with &lt;code&gt;WebContentsForceDark&lt;/code&gt;). It did not reproduce the problem: plain fills stayed correct. So Samsung's behaviour is different, and desktop Chrome is not a good stand-in for it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;Since a small unscaled image survived, I paint the orange as a 10 by 10 pixel SVG that repeats at its own size, instead of as a CSS colour:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;--acc-tile&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Crect width='10' height='10' fill='%23ff5714'/%3E%3C/svg%3E"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="nt"&gt;--acc-fill&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--acc-tile&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nt"&gt;repeat&lt;/span&gt; &lt;span class="nt"&gt;border-box&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then 25 rules that said &lt;code&gt;background: var(--acc)&lt;/code&gt; now say &lt;code&gt;background: var(--acc-fill)&lt;/code&gt;, with &lt;code&gt;border-color: transparent&lt;/code&gt; so no dark red outline appears. A few other things had to change too:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The email underline was a gradient. It is now a separate strip, and the hover effect uses &lt;code&gt;clip-path&lt;/code&gt; instead of resizing, because resizing would scale the image.&lt;/li&gt;
&lt;li&gt;The play triangle in the Auto-scroll button was a CSS border triangle. It is now a filled box cropped with &lt;code&gt;clip-path&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The university logo is a white PNG on a white CSS plate, and the phone turned both grey. A small script now draws the plate and logo on a canvas, with an &lt;code&gt;aria-label&lt;/code&gt; for screen readers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On desktop browsers the orange still measures exactly 255, 87, 20, so normal visitors see no difference. On my phone, after the fix:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fiv2xu82nyv8fjvyhnd6t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fiv2xu82nyv8fjvyhnd6t.png" alt="My phone after the fix: the buttons are orange again, but a lighter orange than intended" width="800" height="1419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What the fix does not solve
&lt;/h2&gt;

&lt;p&gt;This is much better, not solved.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The orange is lighter.&lt;/strong&gt; The buttons now measure 255, 110, 42, a bit peachy. I tried darker tiles (seven different oranges) and all of them came out at almost the same colour, so I can't compensate that way.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Orange text is still lighter&lt;/strong&gt; (255, 119, 53). I didn't fix it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The page background is still darkened&lt;/strong&gt;, from 12, 12, 11 to about 2, 2, 0.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Some plain orange is still used&lt;/strong&gt; for borders, outlines and hover states. I haven't checked each of them on the phone.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The light resume sheet can't stay light.&lt;/strong&gt; A white sheet became dark grey, and nothing I tried stopped it. So the resume page now shows a short note to Samsung Internet users, based on the browser's user agent string. If Samsung changes that string, the note disappears. I tested the note on my own phone in Samsung Internet and it shows there.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chrome's own forced dark mode would make the fix darker.&lt;/strong&gt; In the desktop simulation, my tile became 217, 51, 0.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The code is harder to read.&lt;/strong&gt; The orange is now an image behind two CSS variables, and the logo needs JavaScript.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I haven't tested
&lt;/h2&gt;

&lt;p&gt;Chrome on Android with its auto dark mode flag, Firefox, Safari, and Samsung Internet on desktop. I also haven't checked whether the dark mode alters the project screenshots.&lt;/p&gt;

&lt;h2&gt;
  
  
  If it happens to you
&lt;/h2&gt;

&lt;p&gt;Try your site in different browsers before you ship it. I only found this because a friend happened to use Samsung Internet.&lt;/p&gt;

&lt;p&gt;The fix is in the commit history of my portfolio repo: &lt;a href="https://github.com/Burthcer/portfolio" rel="noopener noreferrer"&gt;https://github.com/Burthcer/portfolio&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you know how Samsung Internet decides what to darken, I'd like to hear it.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>android</category>
      <category>debugging</category>
    </item>
    <item>
      <title>What happened when I ran my PDF tools on a PC with 1 GB of memory</title>
      <dc:creator>Dev Bhamaria</dc:creator>
      <pubDate>Sun, 11 Oct 2026 13:18:50 +0000</pubDate>
      <link>https://dev.to/burthcer/what-happened-when-i-ran-my-pdf-tools-on-a-pc-with-1-gb-of-memory-3in7</link>
      <guid>https://dev.to/burthcer/what-happened-when-i-ran-my-pdf-tools-on-a-pc-with-1-gb-of-memory-3in7</guid>
      <description>&lt;p&gt;IHatePDF is a free, open-source set of 28 PDF tools that runs on your own machine. Nothing is uploaded. That also means it has to live with whatever memory your PC has, and scanned PDFs get big fast. So I tested what happens on small machines.&lt;/p&gt;

&lt;h2&gt;
  
  
  The test
&lt;/h2&gt;

&lt;p&gt;I generated dummy scans: 300 dpi JPEGs of 10, 50, 150 and 500 MB (the 500 MB one is 144 pages). I ran Compress, Watermark, Merge, Rotate, Page numbers and PDF to Word on all of them. To pretend to be a smaller PC, I forced a memory budget for the app: 624 MB (a 4 GB PC with some margin), 1 GB (4 GB), 3 GB (6 GB), 4 GB (8 GB), 8 GB (16 GB), and no limit. The test machine is a Windows 11 laptop with 32 GB of RAM, running the installed app, not a dev build.&lt;/p&gt;

&lt;p&gt;I wanted to test low memory because I want this to run on laptops and college PCs, not just on my own machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version 1.3.0 failed
&lt;/h2&gt;

&lt;p&gt;At a 1 GB budget, Compress stopped on every scan, even the 10 MB one, within a second or two. Watermark on the 500 MB scan stopped too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version 1.3.1
&lt;/h2&gt;

&lt;p&gt;Same machine, same 1 GB budget:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scan&lt;/th&gt;
&lt;th&gt;Compress result&lt;/th&gt;
&lt;th&gt;Time&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;10 MB&lt;/td&gt;
&lt;td&gt;831 KB&lt;/td&gt;
&lt;td&gt;2.9 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;50 MB&lt;/td&gt;
&lt;td&gt;4.04 MB&lt;/td&gt;
&lt;td&gt;10.6 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;150 MB&lt;/td&gt;
&lt;td&gt;11.7 MB&lt;/td&gt;
&lt;td&gt;31.3 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;500 MB&lt;/td&gt;
&lt;td&gt;38.4 MB&lt;/td&gt;
&lt;td&gt;120.6 s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Watermark on the 500 MB scan took 2.6 s, with the whole app peaking at 1.1 GB.&lt;/p&gt;

&lt;p&gt;Across all six tools and all six budgets, nothing failed outright on the 6 GB, 8 GB and 16 GB budgets. At the tightest budgets some jobs slowed down but finished, and none of the 144 scan runs or 56 student-file runs was stopped.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it still breaks
&lt;/h2&gt;

&lt;p&gt;I wrote the limits into the report as well:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Compress can stop with "Windows is almost out of memory" when Windows itself is within about 160 MB of the memory it keeps free. Other tools slow down and finish.&lt;/li&gt;
&lt;li&gt;PDF to Word leaves out sideways (rotated) text, in any language.&lt;/li&gt;
&lt;li&gt;Page previews are about 8 times slower at a 1 GB budget.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The app now refuses a single 300-megapixel image before starting (0.4 s), and stops a running job in about 2.4 s if Windows is down to 300 MB free. It stays usable afterwards.&lt;/p&gt;

&lt;p&gt;What surprised me was how much memory the app used. If I did it again, I would design for low memory from the first day, instead of changing the structure of the code later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Code and test report: &lt;a href="https://github.com/Burthcer/IHatePDF" rel="noopener noreferrer"&gt;https://github.com/Burthcer/IHatePDF&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Me: &lt;a href="https://devbhamaria.com" rel="noopener noreferrer"&gt;https://devbhamaria.com&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you test offline or local-first tools on small machines, I'd like to know how you test them.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>webdev</category>
      <category>testing</category>
      <category>pdf</category>
    </item>
  </channel>
</rss>
