<?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: kurokky（黒木シンタロー）</title>
    <description>The latest articles on DEV Community by kurokky（黒木シンタロー） (@kurokky).</description>
    <link>https://dev.to/kurokky</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F787606%2F5cdefa50-b5ae-43f3-8391-966f51ed8968.jpg</url>
      <title>DEV Community: kurokky（黒木シンタロー）</title>
      <link>https://dev.to/kurokky</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kurokky"/>
    <language>en</language>
    <item>
      <title>Make the sound of Mario's coins in your browser!</title>
      <dc:creator>kurokky（黒木シンタロー）</dc:creator>
      <pubDate>Fri, 01 Apr 2022 07:54:16 +0000</pubDate>
      <link>https://dev.to/kurokky/make-the-sound-of-marios-coins-in-your-browser-4am5</link>
      <guid>https://dev.to/kurokky/make-the-sound-of-marios-coins-in-your-browser-4am5</guid>
      <description>&lt;p&gt;Let's take a quick look and Click "?" on &lt;a href="https://bu-kurokky.github.io/mytest/beep/nes.html"&gt;this page&lt;/a&gt;!&lt;/p&gt;

&lt;h2&gt;
  
  
  The started
&lt;/h2&gt;

&lt;p&gt;I wanted to sound in my browser. I did some research and found a way to convert mp3 and m4a files to base64 and play them, but that method was not what I wanted to do. A little more investigation revealed that it can be done with "AudioContext".&lt;/p&gt;

&lt;p&gt;Moreover, the parameter was 'triangle, 'sine,' 'square,' 'sawtooth,' which were the very sounds used in the NES.&lt;/p&gt;

&lt;p&gt;If this happens, I'll have to do it!&lt;/p&gt;

&lt;h2&gt;
  
  
  What made you think of NES?
&lt;/h2&gt;

&lt;p&gt;No need to talk about the sound of NES in this day and age, right? Please bear with me for a moment.&lt;br&gt;
If I talk in detail about the specifications of the NES sound, there are about eight different types of sounds, because some of them have changed the ratio of square waves, but basically only four sounds can be produced.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;name&lt;/th&gt;
&lt;th&gt;details&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;square&lt;/td&gt;
&lt;td&gt;for melodies / can play two sounds same time.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;triangle&lt;/td&gt;
&lt;td&gt;for bass, sound effects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;noise&lt;/td&gt;
&lt;td&gt;for drums , rhythm , sound effects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DPCM&lt;/td&gt;
&lt;td&gt;voice etc.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;As mentioned above, when people see "square wave and triangle wave," people over the age of 40 definitely think it's the NES. Some NES geeks may have "Konami Sound Staff Club Kukeiha" in mind.&lt;/p&gt;
&lt;h2&gt;
  
  
  Technical
&lt;/h2&gt;

&lt;p&gt;If you look at the source, there is nothing particularly difficult to do, so if you want to play the sound of a coin, you can do so by playing the "E" sound after the "B" sound.&lt;/p&gt;

&lt;p&gt;It looks like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const AudioContext = window.AudioContext || window.webkitAudioContext
const audioContext = new AudioContext()
const gainNode = audioContext.createGain()
gainNode.connect(audioContext.destination)
gainNode.gain.value = 0.1
const oscillator = audioContext.createOscillator()
oscillator.connect(gainNode)
oscillator.type = "square"
oscillator.frequency.setValueAtTime(987.766, audioContext.currentTime)//B
oscillator.frequency.setValueAtTime(1318.51, audioContext.currentTime + 0.08)//E
oscillator.start()
oscillator.stop(.5)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Be careful not to specify gain.value or your ears will die...(super loud). My sense of sound was not up to par, and I couldn't make out the sound of the power-up and entering the clay pipe no matter how I tried, so I had to analyze it at about 10% speed.(I don't think it is possible for normal people.)&lt;/p&gt;

&lt;p&gt;If you listen carefully, there are some strange things. but I tried to do a lot of things with &lt;a href="https://github.com/pendragon-andyh/WebAudio-PulseOscillator"&gt;WebAudio-PulseOscillator&lt;/a&gt;, but I just thought, "I'll just use the default sound." and "I'll do it with what I have!"&lt;/p&gt;

&lt;p&gt;If you really work hard, you could probably make something serious by having it read midi and MML with the technology to make synthesizers, and it would be interesting to make an application for it in electron.&lt;/p&gt;

&lt;h2&gt;
  
  
  important point
&lt;/h2&gt;

&lt;p&gt;I thought it would be tasteless to use only buttons, so I tried to reproduce the dots using table tags, but this is a "bonus" because of the rights issue.&lt;/p&gt;

&lt;h2&gt;
  
  
  Correspondence table
&lt;/h2&gt;

&lt;p&gt;If you are interested in doing something similar, this might be useful.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;note&lt;/th&gt;
&lt;th&gt;Hz&lt;/th&gt;
&lt;th&gt;etc&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;6.875&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A#&lt;/td&gt;
&lt;td&gt;7.283&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;7.716&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;8.175&lt;/td&gt;
&lt;td&gt;MIDI LOW&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C#&lt;/td&gt;
&lt;td&gt;8.661&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D&lt;/td&gt;
&lt;td&gt;9.177&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D#&lt;/td&gt;
&lt;td&gt;9.722&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E&lt;/td&gt;
&lt;td&gt;10.3&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;10.913&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F#&lt;/td&gt;
&lt;td&gt;11.562&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G&lt;/td&gt;
&lt;td&gt;12.249&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G#&lt;/td&gt;
&lt;td&gt;12.978&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;13.75&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A#&lt;/td&gt;
&lt;td&gt;14.567&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;15.433&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;16.351&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C#&lt;/td&gt;
&lt;td&gt;17.323&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D&lt;/td&gt;
&lt;td&gt;18.354&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D#&lt;/td&gt;
&lt;td&gt;19.445&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E&lt;/td&gt;
&lt;td&gt;20.601&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;21.826&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F#&lt;/td&gt;
&lt;td&gt;23.124&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G&lt;/td&gt;
&lt;td&gt;24.499&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G#&lt;/td&gt;
&lt;td&gt;25.956&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;27.5&lt;/td&gt;
&lt;td&gt;Piano Low&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A#&lt;/td&gt;
&lt;td&gt;29.135&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;30.867&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;32.703&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C#&lt;/td&gt;
&lt;td&gt;34.647&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D&lt;/td&gt;
&lt;td&gt;36.708&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D#&lt;/td&gt;
&lt;td&gt;38.89&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E&lt;/td&gt;
&lt;td&gt;41.203&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;43.653&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F#&lt;/td&gt;
&lt;td&gt;46.249&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G&lt;/td&gt;
&lt;td&gt;48.999&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G#&lt;/td&gt;
&lt;td&gt;51.913&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;55.0&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A#&lt;/td&gt;
&lt;td&gt;58.27&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;61.735&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;65.406&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C#&lt;/td&gt;
&lt;td&gt;69.295&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D&lt;/td&gt;
&lt;td&gt;73.416&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D#&lt;/td&gt;
&lt;td&gt;77.781&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E&lt;/td&gt;
&lt;td&gt;82.406&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;87.307&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F#&lt;/td&gt;
&lt;td&gt;92.498&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G&lt;/td&gt;
&lt;td&gt;97.998&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G#&lt;/td&gt;
&lt;td&gt;103.826&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;110.0&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A#&lt;/td&gt;
&lt;td&gt;116.54&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;123.47&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;130.812&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C#&lt;/td&gt;
&lt;td&gt;138.591&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D&lt;/td&gt;
&lt;td&gt;146.832&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D#&lt;/td&gt;
&lt;td&gt;155.563&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E&lt;/td&gt;
&lt;td&gt;164.813&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;174.614&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F#&lt;/td&gt;
&lt;td&gt;184.997&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G&lt;/td&gt;
&lt;td&gt;195.997&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G#&lt;/td&gt;
&lt;td&gt;207.652&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;220.0&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A#&lt;/td&gt;
&lt;td&gt;233.081&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;246.941&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;261.625&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C#&lt;/td&gt;
&lt;td&gt;277.182&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D&lt;/td&gt;
&lt;td&gt;293.664&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D#&lt;/td&gt;
&lt;td&gt;311.126&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E&lt;/td&gt;
&lt;td&gt;329.627&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;349.228&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F#&lt;/td&gt;
&lt;td&gt;369.994&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G&lt;/td&gt;
&lt;td&gt;391.995&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G#&lt;/td&gt;
&lt;td&gt;415.304&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;440.0&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A#&lt;/td&gt;
&lt;td&gt;466.163&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;493.883&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;523.251&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C#&lt;/td&gt;
&lt;td&gt;554.365&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D&lt;/td&gt;
&lt;td&gt;587.329&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D#&lt;/td&gt;
&lt;td&gt;622.253&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E&lt;/td&gt;
&lt;td&gt;659.255&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;698.456&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F#&lt;/td&gt;
&lt;td&gt;739.988&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G&lt;/td&gt;
&lt;td&gt;783.99&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G#&lt;/td&gt;
&lt;td&gt;830.609&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;880.0&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A#&lt;/td&gt;
&lt;td&gt;932.327&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;987.766&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;1046.502&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C#&lt;/td&gt;
&lt;td&gt;1108.73&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D&lt;/td&gt;
&lt;td&gt;1174.659&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D#&lt;/td&gt;
&lt;td&gt;1244.507&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E&lt;/td&gt;
&lt;td&gt;1318.51&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;1396.912&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F#&lt;/td&gt;
&lt;td&gt;1479.977&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G&lt;/td&gt;
&lt;td&gt;1567.981&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G#&lt;/td&gt;
&lt;td&gt;1661.218&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;1760.0&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A#&lt;/td&gt;
&lt;td&gt;1864.655&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;1975.533&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;2093.004&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C#&lt;/td&gt;
&lt;td&gt;2217.461&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D&lt;/td&gt;
&lt;td&gt;2349.318&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D#&lt;/td&gt;
&lt;td&gt;2489.015&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E&lt;/td&gt;
&lt;td&gt;2637.02&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;2793.825&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F#&lt;/td&gt;
&lt;td&gt;2959.955&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G&lt;/td&gt;
&lt;td&gt;3135.963&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G#&lt;/td&gt;
&lt;td&gt;3322.437&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;3520.0&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A#&lt;/td&gt;
&lt;td&gt;3729.31&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;3951.066&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;4186.009&lt;/td&gt;
&lt;td&gt;Piano HIGH&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C#&lt;/td&gt;
&lt;td&gt;4434.922&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D&lt;/td&gt;
&lt;td&gt;4698.636&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D#&lt;/td&gt;
&lt;td&gt;4978.031&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E&lt;/td&gt;
&lt;td&gt;5274.04&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;5587.651&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F#&lt;/td&gt;
&lt;td&gt;5919.91&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G&lt;/td&gt;
&lt;td&gt;6271.926&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G#&lt;/td&gt;
&lt;td&gt;6644.875&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;7040.0&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A#&lt;/td&gt;
&lt;td&gt;7458.62&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;7902.132&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;8372.018&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C#&lt;/td&gt;
&lt;td&gt;8869.844&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D&lt;/td&gt;
&lt;td&gt;9397.272&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D#&lt;/td&gt;
&lt;td&gt;9956.063&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E&lt;/td&gt;
&lt;td&gt;10548.081&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;11175.303&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F#&lt;/td&gt;
&lt;td&gt;11839.821&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G&lt;/td&gt;
&lt;td&gt;12543.853&lt;/td&gt;
&lt;td&gt;MIDI HIGH&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G#&lt;/td&gt;
&lt;td&gt;13289.75&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;14080.0&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A#&lt;/td&gt;
&lt;td&gt;14917.24&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;15804.265&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;16744.036&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C#&lt;/td&gt;
&lt;td&gt;17739.688&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D&lt;/td&gt;
&lt;td&gt;18794.545&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D#&lt;/td&gt;
&lt;td&gt;19912.126&lt;/td&gt;
&lt;td&gt;HUMAN HIGH&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E&lt;/td&gt;
&lt;td&gt;21096.163&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;22350.606&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F#&lt;/td&gt;
&lt;td&gt;23679.643&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G&lt;/td&gt;
&lt;td&gt;25087.707&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G#&lt;/td&gt;
&lt;td&gt;26579.5&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>javascript</category>
      <category>css</category>
      <category>nes</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to develop the plugin deal with i18n in Figma Plugin?</title>
      <dc:creator>kurokky（黒木シンタロー）</dc:creator>
      <pubDate>Sat, 12 Mar 2022 13:29:40 +0000</pubDate>
      <link>https://dev.to/kurokky/how-to-develop-the-plugin-deal-with-i18n-in-figma-plugin-295</link>
      <guid>https://dev.to/kurokky/how-to-develop-the-plugin-deal-with-i18n-in-figma-plugin-295</guid>
      <description>&lt;p&gt;Hi, guys!&lt;/p&gt;

&lt;p&gt;Where are you live? L.A? Ottawa? Melbourne? Am I? I'm live in Tokyo.&lt;br&gt;&lt;br&gt;
As many of you know, it's very difficult to handle internationalization. In particular, units of currency and inches, centimeters are very tricky. &lt;br&gt;
I have traveled to U.S and Cebu, Hanoi, HongKong several times, and every time I arrive in a country and see the expiration date on yogurt at the airport kiosk, my head crashes. And, If I were to move from Seattle to Vancouver, it would be unbelievable to me as a Japanese person that the notation would be different even though we are in the same English-speaking country.(Actually, it's not.)&lt;/p&gt;

&lt;p&gt;Of course, in the current web world, there are i18n libraries in Javascript and other server side languages, so there is nothing wrong with converting from unixtime to your local time. Yes, within the web world... This is determined based on the value of the browser's "window.navigator.language", but unfortunately, no function or variable to obtain such an environment variable was found in &lt;a href="https://www.figma.com/plugin-docs/api/api-reference/"&gt;the API of Figma Design's&lt;/a&gt; Plugin.&lt;/p&gt;

&lt;p&gt;But it is engineers who confront such problems, isn't it? In this article, I will write about my own solution.&lt;/p&gt;
&lt;h2&gt;
  
  
  Retrieve from UI screen.
&lt;/h2&gt;

&lt;p&gt;I've written in conclusion, but this is the way to do it. (Of course, a few tips are necessary, so please read to the end if you can.)&lt;/p&gt;

&lt;p&gt;Figma Plugin can be developed in two types with or without UI screen.&lt;/p&gt;

&lt;p&gt;What?" You want to make a plugin with no UI that supports internationalization?" I was the same way. So this title.&lt;br&gt;
The Figma plug-in UI has a mode in which the UI is not displayed.&lt;br&gt;&lt;br&gt;
Oh, you who think that because I am Japanese, my English is even weirder than it originally was, look at the sample below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;figma.showUI(__html__,{width:0,height:0, title:""})
figma.ui.hide()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yes, this is HIDE mode!&lt;br&gt;&lt;br&gt;
Let's make the sample a little more clear.&lt;/p&gt;

&lt;h2&gt;
  
  
  When internationalizing an alert.
&lt;/h2&gt;

&lt;p&gt;Normally, it is recommended to use 'Figma.notify' instead of 'Alert' in Javascript when warning users in Figma. However, as mentioned above, Figma API does not have a way to obtain user language information, so internationalization is supported by using hide mode and combining it with HTML on the UI side.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Append '"ui":"ui.html",' to manifest.json.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "name": "AlertSample",
  "id": "XXXXXXXXXXXXXXXX",
  "api": "1.0.0",
  "main": "code.js",
  "ui":"ui.html",
  "editorType": [
    "figma"
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Add function to call ui.html from code.js. (This is a file that runs in the background.)
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
function showAlert(message) {
    figma.showUI(__html__,{width:0,height:0, title:""})
    figma.ui.hide()
    figma.ui.postMessage({type:"alert", message:message})
}

main(){
    //Figma.notify("Hi!")
    showAlert({en:"Hi!",es:"Hola!"})
}

main()

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;ui.html as shown below.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script&amp;gt;
onmessage = (event) =&amp;gt; {
  if (event.data.pluginMessage.type === "alert"){
    let massage = event.data.pluginMessage.message.en
    if (window.navigator.language == "es"){
      massage = event.data.pluginMessage.message.es
    }
    alert(massage)
  }
}
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's easy. But this still has bugs. The plugin does not disappear when the alert is closed. Adding "figma.closePlugin()" to code.js will exit without an alert, so this is also not cool.&lt;/p&gt;

&lt;p&gt;"Then what should I do?" &lt;/p&gt;

&lt;p&gt;OK! Go back to code.js and close it again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Code
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
function showAlert(message) {
    figma.showUI(__html__,{width:0,height:0, title:""})
    figma.ui.hide()
    figma.ui.postMessage({type:"alert", message:message})
}

main(){
    //Figma.notify("Hi!")
    showAlert({en:"Hi!",es:"Hola!"})
}

main()

figma.ui.onmessage = (msg) =&amp;gt; {
    if (msg.kind === "exit"){
        figma.closePlugin()
        return
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script&amp;gt;
onmessage = (event) =&amp;gt; {
  if (event.data.pluginMessage.type === "alert"){
    let massage = event.data.pluginMessage.message.en
    if (window.navigator.language == "es"){
      massage = event.data.pluginMessage.message.es
    }
    alert(massage)
    parent.postMessage({ pluginMessage: { kind: 'exit', type:""} }, '*')
    return
  }
}
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yes, this way we could easily support internationalization. The sample code is in Javascript and does not use the i18n library, but this method should make it easy to support multilingualization using json files, which are often used. (It is the same as using TypeScript.)&lt;/p&gt;

&lt;p&gt;In addition to the alert, I can easily use things like window.confirm, which does not exist in the Figma API, to receive language as an argument from ui.html and process each language separately.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sum up
&lt;/h2&gt;

&lt;p&gt;I hope that the world will soon become a peaceful place where people can travel a lot.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>figma</category>
      <category>i18n</category>
      <category>typescript</category>
    </item>
    <item>
      <title>What's the best way how to a movie file convert to an animation image(animation gif or animation png or webP)?</title>
      <dc:creator>kurokky（黒木シンタロー）</dc:creator>
      <pubDate>Mon, 28 Feb 2022 08:14:31 +0000</pubDate>
      <link>https://dev.to/kurokky/whats-the-best-way-how-to-a-movie-file-convert-to-an-animation-imageanimation-gif-or-animation-png-or-webp-3mm5</link>
      <guid>https://dev.to/kurokky/whats-the-best-way-how-to-a-movie-file-convert-to-an-animation-imageanimation-gif-or-animation-png-or-webp-3mm5</guid>
      <description>&lt;p&gt;Hi, guys!&lt;/p&gt;

&lt;p&gt;What format do you use when you really need to convert a movie file such as mp4 to an animation image file?&lt;br&gt;
I think the most popular solution is to convert to gif, but it only supports 256 colors, so in recent years it is better to use animation png or webp. And the file size varies depending on whether the movie file has a large number of pixels or a small number of pixels, and most importantly, has it been converted beautifully? Wouldn't you like to see with your own eyes whether the file size is different depending on whether the movie file has many or few pixels?&lt;/p&gt;

&lt;p&gt;Today, I've tried to make some animated images from some movie files using FFmpeg to make them clearer,and let's find out the best way to do this in 2022!&lt;/p&gt;
&lt;h2&gt;
  
  
  About formats
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Extension&lt;/th&gt;
&lt;th&gt;Number of pixels&lt;/th&gt;
&lt;th&gt;Alpha Channel&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GIF&lt;/td&gt;
&lt;td&gt;.gif&lt;/td&gt;
&lt;td&gt;256&lt;/td&gt;
&lt;td&gt;OK&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://en.wikipedia.org/wiki/APNG"&gt;Animation PNG&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;.apng/.png&lt;/td&gt;
&lt;td&gt;full colors&lt;/td&gt;
&lt;td&gt;OK&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://en.wikipedia.org/wiki/WebP"&gt;WebP&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;webp&lt;/td&gt;
&lt;td&gt;full colors&lt;/td&gt;
&lt;td&gt;OK&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In Japan, animation png is one of the famous image formats in the sticker function of the SNS chat application called LINE.&lt;/p&gt;
&lt;h2&gt;
  
  
  Commands
&lt;/h2&gt;

&lt;p&gt;The original movie files are mov file (fps60) that captures the screen of my Mac, and I used ffmpeg and other tools to converted these files.(I used a Raspberry Pi as the conversion machine.)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- gif --
# Don't set anything and just make a gif.
ffmpeg -i gradation.mov gradation_default.gif

# with fps10 and a color palette.
ffmpeg -i gradation.mov -filter_complex "[0:v] fps=10:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" gradation_palette.gif

-- apng --

# Don't set anything and just make an apng(Infinite loop).
ffmpeg -i gradation.mov -plays 0 gradation_default.apng
ffmpeg -i gradation.mov -plays 0 -framerate 10 gradation_fps10.apng
# with fps10 and a color palette.
# ffmpeg -i gradation.mov -vf palettegen g_palette.png #I made a color palette once I got curious.
# About 0.3x, which might be the slowest.
ffmpeg -i gradation.mov -i g_palette.png -framerate 10 -filter_complex paletteuse -plays 0 gradation_palette.apng
# use gif2apng
gif2apng gradation_palette.gif gradation_palette2.apng

-- webp --
# Don't set anything and just make a webp(Infinite loop).
ffmpeg -i gradation.mov -loop 0 gradation_default.webp
# with fps10 and the highest quality
ffmpeg -i gradation.mov -vcodec libwebp -quality 100 -filter:v fps=fps=10 -lossless 0 -loop 0 -an -vsync 0 gradation_10_q100.webp
# with fps10 and the lowest quality
ffmpeg -i gradation.mov -vcodec libwebp -quality 0 -filter:v fps=fps=10 -lossless 0 -loop 0 -an -vsync 0 gradation_10_q000.webp
# with fps10 and preset is 4 and compression level is 6(the highest.)
ffmpeg -i gradation.mov -vcodec libwebp -compression_level 6 -filter:v fps=fps=10 -lossless 0 -loop 0 -preset 4 -an -vsync 0 gradation_10_lv6.webp
# with fps10 and preset is 4 and compression level is zero(the lowest.)
ffmpeg -i gradation.mov -vcodec libwebp -compression_level 0  -filter:v fps=fps=10 -lossless 0 -loop 0 -preset 4 -an -vsync 0 gradation_10_lv0.webp

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  File size Results
&lt;/h2&gt;

&lt;p&gt;st_count.mov&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;extension&lt;/th&gt;
&lt;th&gt;name&lt;/th&gt;
&lt;th&gt;size&lt;/th&gt;
&lt;th&gt;percentage&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;mov&lt;/td&gt;
&lt;td&gt;original&lt;/td&gt;
&lt;td&gt;1.4MB&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;gif&lt;/td&gt;
&lt;td&gt;st_count_default&lt;/td&gt;
&lt;td&gt;96K&lt;/td&gt;
&lt;td&gt;6.6%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;gif&lt;/td&gt;
&lt;td&gt;st_count_palette&lt;/td&gt;
&lt;td&gt;40K&lt;/td&gt;
&lt;td&gt;2.7%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;apng&lt;/td&gt;
&lt;td&gt;st_count_default&lt;/td&gt;
&lt;td&gt;732K&lt;/td&gt;
&lt;td&gt;51.0%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;apng&lt;/td&gt;
&lt;td&gt;st_count_fps10&lt;/td&gt;
&lt;td&gt;732K&lt;/td&gt;
&lt;td&gt;51.0%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;apng&lt;/td&gt;
&lt;td&gt;st_count_palette&lt;/td&gt;
&lt;td&gt;192K&lt;/td&gt;
&lt;td&gt;13.3%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;apng&lt;/td&gt;
&lt;td&gt;st_count_palette2&lt;/td&gt;
&lt;td&gt;40K&lt;/td&gt;
&lt;td&gt;2.7%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;webp&lt;/td&gt;
&lt;td&gt;st_count_default&lt;/td&gt;
&lt;td&gt;16K&lt;/td&gt;
&lt;td&gt;1.1%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;webp&lt;/td&gt;
&lt;td&gt;st_count_10_q100&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.5M&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;107.1%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;webp&lt;/td&gt;
&lt;td&gt;st_count_10_q000&lt;/td&gt;
&lt;td&gt;212K&lt;/td&gt;
&lt;td&gt;14.7%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;webp&lt;/td&gt;
&lt;td&gt;st_count_10_lv6&lt;/td&gt;
&lt;td&gt;804K&lt;/td&gt;
&lt;td&gt;56%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;webp&lt;/td&gt;
&lt;td&gt;st_count_10_lv0&lt;/td&gt;
&lt;td&gt;804K&lt;/td&gt;
&lt;td&gt;56%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;As mentioned above, if the original image has a small number of pixels, converting it to a gif without any options will not increase the file size.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;extension&lt;/th&gt;
&lt;th&gt;name&lt;/th&gt;
&lt;th&gt;size&lt;/th&gt;
&lt;th&gt;percentage&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;mov&lt;/td&gt;
&lt;td&gt;original&lt;/td&gt;
&lt;td&gt;1.8MB&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;gif&lt;/td&gt;
&lt;td&gt;gradation_default&lt;/td&gt;
&lt;td&gt;1.1M&lt;/td&gt;
&lt;td&gt;61.1%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;gif&lt;/td&gt;
&lt;td&gt;gradation_palette&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.2M&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;122%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;apng&lt;/td&gt;
&lt;td&gt;gradation_default&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.2M&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;122%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;apng&lt;/td&gt;
&lt;td&gt;gradation_fps10&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.2M&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;122%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;apng&lt;/td&gt;
&lt;td&gt;gradation_palette&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;6.9M&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;383%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;apng&lt;/td&gt;
&lt;td&gt;gradation_palette2&lt;/td&gt;
&lt;td&gt;1.5M&lt;/td&gt;
&lt;td&gt;83%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;webp&lt;/td&gt;
&lt;td&gt;gradation_default&lt;/td&gt;
&lt;td&gt;35K&lt;/td&gt;
&lt;td&gt;1.8%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;webp&lt;/td&gt;
&lt;td&gt;gradation_10_q100&lt;/td&gt;
&lt;td&gt;363K&lt;/td&gt;
&lt;td&gt;19.6%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;webp&lt;/td&gt;
&lt;td&gt;gradation_10_q000&lt;/td&gt;
&lt;td&gt;71K&lt;/td&gt;
&lt;td&gt;3.8%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;webp&lt;/td&gt;
&lt;td&gt;gradation_10_lv6&lt;/td&gt;
&lt;td&gt;120K&lt;/td&gt;
&lt;td&gt;6.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;webp&lt;/td&gt;
&lt;td&gt;gradation_10_lv0&lt;/td&gt;
&lt;td&gt;120K&lt;/td&gt;
&lt;td&gt;6.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In this case as well, the gifs with the specified color palette are larger than the original size. Also, all apngs (except gif2apng) are enlarged from their original size.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem is image quality.
&lt;/h2&gt;

&lt;p&gt;Please take a look at &lt;a href="https://bu-kurokky.github.io/presentension/benchmark/img_test.html"&gt;this page&lt;/a&gt; and check it out for yourself.(Sorry, you can see Japanese on the screen, but it doesn't matter because it's just an image.)&lt;/p&gt;

&lt;p&gt;The webp of the gradient is a concern, but I feel it is a concern by default (quality 75 if nothing is specified). The parameters also vary depending on the original movies, so I think the results are subtle. (Well, I guess you should use webm instead of webp for certain movies...)&lt;/p&gt;

&lt;p&gt;I think it's a matter of "how much can you tolerate", so each of us must choose what you can compromise on.&lt;br&gt;
(For the simple gradient shown in the sample, it is much better to animate the svg with css.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Sum up
&lt;/h2&gt;

&lt;p&gt;As expected, I was more concerned about the color reduction than the file size when making gifs without parameters.&lt;br&gt;
If you don't care about the file size too much because IE is going to say good-bye, I think it would be a good idea to use WebP. (IE11 also works if you use the picture tags, but it's a pain to use different tags...)&lt;br&gt;
However, there are many platforms that do not support WebP instead of their own sites, so you will need to be careful about that.&lt;/p&gt;

&lt;p&gt;In 2022, there will be more options for images in various situations, so I would like to encourage everyone who runs a website or is a designer to think about it.&lt;br&gt;&lt;br&gt;
This will reduce server costs and reduce the number of traffic users have to deal with, which will definitely improve both costs and UX!&lt;/p&gt;

</description>
      <category>webp</category>
      <category>apng</category>
      <category>gif</category>
      <category>ffmpeg</category>
    </item>
    <item>
      <title>I have mede a tool easily convert your SVG file deal with dark mode.</title>
      <dc:creator>kurokky（黒木シンタロー）</dc:creator>
      <pubDate>Thu, 03 Feb 2022 15:23:00 +0000</pubDate>
      <link>https://dev.to/kurokky/i-have-mede-a-tool-easily-convert-your-svg-file-deal-with-dark-mode-3jm4</link>
      <guid>https://dev.to/kurokky/i-have-mede-a-tool-easily-convert-your-svg-file-deal-with-dark-mode-3jm4</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---MC9PYmv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/01o5nbfsoc0thbrik57f.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---MC9PYmv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/01o5nbfsoc0thbrik57f.gif" alt="Image description" width="640" height="497"&gt;&lt;/a&gt;&lt;br&gt;
Hi guys,&lt;/p&gt;

&lt;p&gt;Today I would like to introduce a super cool tool for Web Designer and Webfront Engineer. In 2022, Internet Explorer will finally become unusable. This is A SUPER HAPPY NEWS for all web-front engineers, but I think it also signals the beginning of the next battle for designers and engineers. One of those battles is DARK MODE SUPPORT.  &lt;/p&gt;
&lt;h2&gt;
  
  
  What’s Hybrid SVG?
&lt;/h2&gt;

&lt;p&gt;SVG files can support both light mode and dark mode by inserting the following CSS this(Click &lt;a href="https://codyhouse.co/nuggets/svg-favicon-dark-mode"&gt;Here&lt;/a&gt; For More Info!).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@media (prefs-color-scheme: dark)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check out the Favicon on &lt;a href="https://pexr.net/fonts/maker.html?font=KHONGO&amp;amp;text=%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%E3%83%BC"&gt;this page&lt;/a&gt; for an example and try changing Dark mode or Light mode(Sorry this page is only japanese).&lt;br&gt;
That's very cool!!!!&lt;/p&gt;

&lt;p&gt;So, I call SVG files that can support multiple modes “&lt;strong&gt;Hybrid SVG&lt;/strong&gt;”.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3Gc5Lsho--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dzdeg8pjdf56ufm7qjpq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3Gc5Lsho--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dzdeg8pjdf56ufm7qjpq.png" alt="Image description" width="401" height="104"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Headache problem
&lt;/h2&gt;

&lt;p&gt;The ability to do this transformation in Drawtools (e.g. Illustrator) is not provided (at least from what I can tell).&lt;br&gt;&lt;br&gt;
So, who will be responsible for these tasks? Front-end engineers? Designers?  &lt;/p&gt;

&lt;p&gt;If it’s just one or two colors, a designer might be able to open a text editor and handle it...&lt;br&gt;&lt;br&gt;
However, What if the file can not be edited by other designer? What if the designers don’t have the skills, experience, or time to change a lot of colors accurately? What if the designer says “Hey, I’m not a programmer!“?&lt;br&gt;&lt;br&gt;
Also, it's strange for an engineer to use the "sed command" for a designer's little curiosity.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Let's resolve
&lt;/h2&gt;

&lt;p&gt;There’s no use complaining about it.&lt;br&gt;&lt;br&gt;
My motto are "Better than nothing" and "Do it myself rather than say complain."&lt;/p&gt;

&lt;p&gt;OK, Just did that!&lt;/p&gt;

&lt;p&gt;I made &lt;a href="https://pexr.net/hsm/"&gt;Hybrid SVG Maker&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;That is where the “Hybrid SVG Maker” comes in handy.&lt;br&gt;&lt;br&gt;
You don't want to upload a design that's not out in the world yet to another server right?　That site makes it easy to create SVG files that support color substitution and dark mode without having to upload the SVG to a server.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Sum up
&lt;/h2&gt;

&lt;p&gt;It is still in beta, but please try it out.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>svg</category>
      <category>favicon</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to display SVG files and change colors dynamically in React Native.</title>
      <dc:creator>kurokky（黒木シンタロー）</dc:creator>
      <pubDate>Thu, 13 Jan 2022 03:30:50 +0000</pubDate>
      <link>https://dev.to/kurokky/how-to-display-svg-files-and-change-colors-dynamically-in-react-native-3e2i</link>
      <guid>https://dev.to/kurokky/how-to-display-svg-files-and-change-colors-dynamically-in-react-native-3e2i</guid>
      <description>&lt;p&gt;Hi guys,&lt;/p&gt;

&lt;p&gt;In Japan, I have often heard that React Native(RN) is "dead" or "not good" or " Flutter is best" since about three years ago. &lt;br&gt;
Still, it's a solid fact that FaceBook, Instagram ranks high among the apps used in the world. I often tired when I search for "I try to do something on RN", all I get is old information or information that is not buildable.&lt;/p&gt;

&lt;p&gt;Please note that the content of this article is also my method.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why do need to change colors dynamically?
&lt;/h2&gt;

&lt;p&gt;Because I should support Dark Mode!&lt;br&gt;
Sadly? I think the proportion of UI / UX in application development is increasing year by year. No matter how much Jetpack Compose (Android) and SwiftUI (iOS) evolve, the burden on us developers will not decrease.(Especially, I think that animations in screen transitions are demons.)&lt;/p&gt;

&lt;p&gt;Complaints Aside, let's display the SVG files.&lt;/p&gt;
&lt;h2&gt;
  
  
  Use react-native-svg-transformer.
&lt;/h2&gt;

&lt;p&gt;I've seen some articles about using "&lt;a href="https://github.com/vault-development/react-native-svg-uri"&gt;react-native-svg-uri&lt;/a&gt;", but I continue to use "&lt;a href="https://github.com/kristerkari/react-native-svg-transformer"&gt;react-native-svg-transformer&lt;/a&gt;".(I don't think I've experienced react-native-svg-uri working properly.)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;yarn or npm install react-native-svg
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn add react-native-svg
npx pod-install
yarn add --dev react-native-svg-transformer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;2. Rewrite "metro.config.js" in the root directory where "App.js" is located.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { getDefaultConfig } = require("metro-config");

module.exports = (async () =&amp;gt; {
  const {
    resolver: { sourceExts, assetExts }
  } = await getDefaultConfig();
  return {
    transformer: {
      babelTransformerPath: require.resolve("react-native-svg-transformer")
    },
    resolver: {
      assetExts: assetExts.filter(ext =&amp;gt; ext !== "svg"),
      sourceExts: [...sourceExts, "svg"]
    }
  };
})();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3. You should be able to use it by importing the SVG file and specifying the size in JSX.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import Logo from './logo.svg'
/*(omission)*/
&amp;lt;Logo width={100} height={100} /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yes, this is the way as per the official documentation so far.&lt;/p&gt;

&lt;h2&gt;
  
  
  Changing colors dynamically1 (for single color)
&lt;/h2&gt;

&lt;p&gt;Just change the fill part of the SVG file to "currentColor" (the same way you change the SVG color in HTML)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;svg xmlns="http://www.w3.org/2000/svg" version="1.1"&amp;gt;
  &amp;lt;rect width="300" height="100" fill="#f00"/&amp;gt;
&amp;lt;/svg&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Change the above to the following.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;svg xmlns="http://www.w3.org/2000/svg" version="1.1"&amp;gt;
  &amp;lt;rect width="300" height="100" fill="currentColor"/&amp;gt;
&amp;lt;/svg&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set it in style on JSX.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Logo width={100} height={100} style={{color:'#ccc'}}  /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Dynamically changing colors2 (multiple colors, but no more than 5 colors)
&lt;/h2&gt;

&lt;p&gt;This is another way to use SVGR, as described in the react-native-svg-transformer page.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a file named ".svgrrc" in the root directory where "App.js" is located.&lt;/li&gt;
&lt;li&gt;Change the fill value of the SVG file to one of the five colors "#000,#f00,#ff0,#ff1,#f11".(In other words, no more than five colors can be changed.)&lt;/li&gt;
&lt;li&gt;Write ".svgrrc" as follows.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "replaceAttrValues": {
    "#000": "{props.aaa}",
    "#00f": "{props.bbb}",
    "#ff0": "{props.ccc}",
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4. Specify values for JSX.(It is possible to use only one color.)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Logo width="100" height="100" aaa={"#f00"} /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Problems with the SVGR
&lt;/h2&gt;

&lt;p&gt;It did not work properly unless the fill values of the relevant SVG file was a specific number such as "#000".&lt;br&gt;
In conclusion, the SVG color replacement is only for 3 digits of RGB, and the possible replacement strings are as follows.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;RGB&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;#000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;#f00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;#ff0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;#ff1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;#f11&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The combination of websafe colors 0,3,6,9,c almost didn't work.(I couldn't believe that "#f0f" and "#0ff" weren't allowed.)&lt;br&gt;
I guess this means that you don't need to dynamically change things that have a lot of colors.&lt;/p&gt;

&lt;p&gt;Here are didn't work&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#fff
#00f
#ccc
#222-999
#11f
#1f1
#1ff
#f01
#f1f
#f12
#0ff
#f01
#ff0
#ff1
#f1f
#3ff
#321
#f03
#90f
#100
#101
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If I want to change more than five colors, I should probably create a separate SVG file in the first place, but according to the SVGR specification, I should be able to change even six-digit RGB values, and  it should even support regular expressions...&lt;/p&gt;

&lt;h2&gt;
  
  
  Sum up
&lt;/h2&gt;

&lt;p&gt;These up to you to decide if that's true.(Same as the other articles.)&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>node</category>
      <category>javascript</category>
      <category>svg</category>
    </item>
    <item>
      <title>I made a plugins weekly ranking site for all Figma Design Tool users.
</title>
      <dc:creator>kurokky（黒木シンタロー）</dc:creator>
      <pubDate>Fri, 07 Jan 2022 07:45:23 +0000</pubDate>
      <link>https://dev.to/kurokky/i-made-a-plugins-weekly-ranking-site-for-all-figma-design-tool-users-2c11</link>
      <guid>https://dev.to/kurokky/i-made-a-plugins-weekly-ranking-site-for-all-figma-design-tool-users-2c11</guid>
      <description>&lt;p&gt;Hi guys,&lt;/p&gt;

&lt;p&gt;I have developed a &lt;a href="https://pexr.net"&gt;website(https://pexr.net)&lt;/a&gt; for all Figma Design Tool users.(Of course, it's also for developers who are not designers.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Why did you make that?
&lt;/h2&gt;

&lt;p&gt;I have developed some &lt;a href="https://www.figma.com/@kurokky"&gt;Figma Plugins&lt;/a&gt;. And then, whenever that time I have to check when "Are there any similar plugins on &lt;a href="https://www.figma.com/community/plugins"&gt;official page&lt;/a&gt;?"&lt;br&gt;
But, that is not good for me(or same developers).&lt;/p&gt;

&lt;p&gt;For Example&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Can't see the tag informations without going to the detail pages.&lt;/li&gt;
&lt;li&gt;Can't see the list of completely new creations.&lt;/li&gt;
&lt;li&gt;Descending the order of "Installs" that I see only the standard ones that I can find in some blogs.&lt;/li&gt;
&lt;li&gt;Ascending the order of "Installs" that I have to see a lot of unpopular plugins.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I felt that the opportunity loss was so huge in such a situation.&lt;br&gt;
My motto are "Better than nothing" and "Do it myself rather than say complain."&lt;/p&gt;

&lt;p&gt;OK,  Just do it!&lt;/p&gt;

&lt;h2&gt;
  
  
  How does the ranking algorithm?
&lt;/h2&gt;

&lt;p&gt;Basic Ranking excludes plugins that have been released more than 6 months after their v1.0.0 release and have once exceeded 1,000 DL. And then, It also excludes those that do not have 10 DL per week.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does it work?
&lt;/h2&gt;

&lt;p&gt;It is made to be a almost &lt;a href="https://jamstack.org/"&gt;JAMstack&lt;/a&gt;. Actually I used Github Pages and my Raspberry Pi at the very beginning.　However, the Free plan requires a repositoriy to be public and I have to keep the build machine powered on to run the batch only once a week.&lt;br&gt;
That's very inefficient for me!!!!&lt;/p&gt;

&lt;p&gt;So, I got a domain and rent a VPS for the webserver and batch server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical problems
&lt;/h2&gt;

&lt;p&gt;The official website is not Server-side rendering(SSR), you can not do the usual method (download using wget or curl) that's why　I had to use headless chrome.&lt;br&gt;
I use the cui version of Inkscape to generate png file from SVG due to day of OGP image tag. However, the date notation could not be shown divided between Japan, the UK, and the USA.&lt;br&gt;
I set NginX so that it can be displayed without the extension.(To make it a bit cooler)&lt;br&gt;
I use the RANK function of sqlite3. (I was surprised because I didn't have this function when I started using it.)&lt;/p&gt;

&lt;p&gt;I meant to convert the image to WEBP using &lt;a href="https://imagemagick.org/index.php"&gt;ImageMagic&lt;/a&gt; etc..., but directly linking the one on the original site and &lt;/p&gt;

&lt;h2&gt;
  
  
  Sum up
&lt;/h2&gt;

&lt;p&gt;I seem to have completely forgotten English.&lt;/p&gt;

</description>
      <category>nginx</category>
      <category>jamstack</category>
      <category>figma</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
