<?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: Pedro Souza</title>
    <description>The latest articles on DEV Community by Pedro Souza (@groovydog).</description>
    <link>https://dev.to/groovydog</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%2F334881%2Fc7916828-8af5-42c0-9067-9c0f01b1124c.jpeg</url>
      <title>DEV Community: Pedro Souza</title>
      <link>https://dev.to/groovydog</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/groovydog"/>
    <language>en</language>
    <item>
      <title>A Simple Color Picker using HTML</title>
      <dc:creator>Pedro Souza</dc:creator>
      <pubDate>Sat, 01 Aug 2020 23:06:51 +0000</pubDate>
      <link>https://dev.to/groovydog/a-simple-color-picker-using-html-3mb8</link>
      <guid>https://dev.to/groovydog/a-simple-color-picker-using-html-3mb8</guid>
      <description>&lt;p&gt;Hello, World!&lt;/p&gt;

&lt;p&gt;As my first post, i would like to introduce myself. I'm Pedro (Peter, if you prefer), i'm 21yo and I'm starting to learn web.&lt;/p&gt;

&lt;p&gt;So the other day i checked &lt;a href="https://dev.to/ananyaneogi/html-can-do-that-c0n"&gt;this Ananya's post&lt;/a&gt; about simple tools you can do with HTML. I really liked, so i made some of them. The Color Picker caught my attention and i decided to improve it. This is my version of Ananya's Color Picker. I added a white panel to make things visible when selecting colors close to black. In addition, it now also displays RGB and HSL codes:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vNLHYbgg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/824w9n9sv2f69iqhlysf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vNLHYbgg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/824w9n9sv2f69iqhlysf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first step is to create a div box and assign the following CSS:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bfneqbYp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gv82uk7flznsrbjeah83.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bfneqbYp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gv82uk7flznsrbjeah83.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Several successive box-shadows make shading prettier and smoother&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;After that, I put a list to standardize the elements that would be added:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hFt8J5zp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/iy2vm21xe2vkp7qrswqy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hFt8J5zp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/iy2vm21xe2vkp7qrswqy.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, it is necessary to create functions in home.js to convert hexadecimal to other formats. For this, I created a function that takes colorCode.innerHTML in string format and returns it in number. That way it facilitates future conversions ;)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cJLTPSpk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6x88z0p282ey68ti37oh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cJLTPSpk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6x88z0p282ey68ti37oh.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Conversion functions are easily found on the web. You can also add new conversion functions just by putting a new element to the list (home.html) and its functions in home.js. Just be careful that the functions receive and return an array of numbers. I know there is a better way to do this, but I didn't spend much time on it.&lt;/p&gt;

&lt;p&gt;You can find the code in &lt;a href="https://github.com/GroovyDog/Palette"&gt;this repo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a very simple tool but great for beginners (like me) to learn HTML.&lt;/p&gt;

</description>
      <category>html</category>
      <category>webdev</category>
      <category>newbie</category>
      <category>first</category>
    </item>
  </channel>
</rss>
