<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ colors - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ colors - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Wed, 19 Aug 2026 13:22:07 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/colors/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ What is the 60-30-10 Rule in Design? And How to Use it in Your Projects ]]>
                </title>
                <description>
                    <![CDATA[ As designers, colour is a huge component of our work. But many of us struggle with the usage of colours in our designs.  In this article, you will learn about the 60-30-10 colour rule, how it's used, and see a practical example of it. What is the 60-... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/the-60-30-10-rule-in-design/</link>
                <guid isPermaLink="false">66d03a38a30d09f91d49b789</guid>
                
                    <category>
                        <![CDATA[ colors ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Design ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Faith Olohijere ]]>
                </dc:creator>
                <pubDate>Mon, 15 May 2023 17:20:43 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/05/pexels-pixabay-39828.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>As designers, colour is a huge component of our work. But many of us struggle with the usage of colours in our designs. </p>
<p>In this article, you will learn about the 60-30-10 colour rule, how it's used, and see a practical example of it.</p>
<h2 id="heading-what-is-the-60-30-10-rule">What is the 60-30-10 rule?</h2>
<p>In the design world, the 60-30-10 rule is a rule that helps to guide designers on choosing and pairing colours for their designs. </p>
<p>To put it simply, this rule says that the dominant/primary colour should take up 60% of your design, the secondary colour should take up 30%, while an accent colour should take up 10% of your design.</p>
<h3 id="heading-why-is-this-rule-so-important">Why is This Rule so Important?</h3>
<ul>
<li>Emphasizing Key Elements: The 60-30-10 rule is great at emphasizing key elements in your design. The dominant colour draws attention to large surfaces and establishes the overall mood of the design. The secondary colour supports it, while the accent colour at 10% highlights specific features or parts of the design. </li>
<li>Visual Balance: To achieve visual balance in a design, one colour/element should not overpower the others. The 60-30-10 rule ensures that there is a sense of equilibrium and balance, by allocating percentages to each colour.</li>
<li>Simplicity and Consistency: Having 3 established colours simplifies the design process. It narrows down your choices and prevents overwhelming combinations of colours.</li>
</ul>
<h2 id="heading-how-to-choose-colours-for-your-designs">How to Choose Colours for Your Designs</h2>
<p>The 60-30-10 rule has three components:</p>
<ul>
<li>The Primary Colour: This is the dominant colour of the design. It forms the foundation of the colour scheme and covers the majority of the design (60%). The primary colour is typically a neutral colour and is often used as the background of the design. Colours like white, blue, beige, and so on can be used as primary colours. </li>
<li>The Secondary Colour: This colour supports the dominant colour and adds more visual interest to the design. It covers about 30% of the design. The secondary colour can be used for typography, icons, and subheadings/subtitles in a design. Colours like teal, black, dark blue, and others can be used as secondary colours.</li>
<li>The Accent Colour: This colour usually covers about 10% of the design. It helps highlights specific sections of the design like buttons, call-to-action elements, or any element that needs emphasis in a design. Accent colours are usually colours that have high contrast. Colours like yellow, orange, light green, and others make good accent colours.</li>
</ul>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/05/60-final.png" alt="Image" width="600" height="400" loading="lazy">
<em>Illustration of the 60-30-10 rule</em></p>
<p>It's important to choose colours that complement each other for your designs. This will contribute to the overall aesthetics and create a dynamic and engaging visual experience. </p>
<p>If you are worried about what colours to use while designing, you can always check out free colour palette generators. Some colour palette generators you try out include:</p>
<ul>
<li><a target="_blank" href="https://www.freecodecamp.org/news/p/251c1c45-6222-4618-ae62-23843967d9bd/coolors.co">Coolors.co</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/p/251c1c45-6222-4618-ae62-23843967d9bd/mycolor.space">Color Space</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/p/251c1c45-6222-4618-ae62-23843967d9bd/color.adobe.com">Adobe Color</a></li>
</ul>
<h2 id="heading-example-hero-page-using-the-60-30-10-rule">Example Hero Page Using the 60-30-10 Rule</h2>
<p>I designed an hero page to give an illustration of how the rule works.</p>
<h3 id="heading-step-1-choosing-a-frame">Step 1- Choosing a Frame</h3>
<p>I had to choose what desktop frame I wanted to use for the hero page. I chose Macbook Air.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/05/Landing-Page1-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>Macbook Air Desktop frame</em></p>
<h3 id="heading-step-2-adding-a-grid">Step 2- Adding a Grid</h3>
<p>Next, I added a grid to the frame. I used these specifications: Columns-12, Margin-100.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/05/Landing-Page2-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>Adding the Grid</em></p>
<h3 id="heading-step-3-adding-content">Step 3- Adding Content</h3>
<p>Next up, I added the logo and the navigation bar.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/05/Landing-Page3-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>Adding the logo and nav bar</em></p>
<p>I already knew how I wanted the structure of my hero page to look like, so I just added the rest of my design content.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/05/Group-2--5-.png" alt="Image" width="600" height="400" loading="lazy">
<em>My Completed Hero Page Illustrating the 60-30-10 Rule.</em></p>
<p>For the design above:</p>
<ul>
<li>My primary colour is white. It covers the background of the design. It enhances readability and legibility of other elements in the design. Also, I chose white because it's a neutral colour, as I mentioned earlier.</li>
<li>My secondary colour is a saturated black. It supports the primary colour, and is used for text and typography.</li>
<li>My accent colour is a shade of brown. It adds some pop, and provides some contrast in the design.</li>
</ul>
<h2 id="heading-conclusion">Conclusion</h2>
<p>The 60-30-10 rule is used in different design sectors because of how useful it is to designers. Also, it is not a strict requirement and can be adjusted to suit individual preferences and design goals. </p>
<p>By following the 60-30-10 rule, you can achieve a well-balanced color scheme that ensures visual interest and coherence in your design. Basically, just choose: </p>
<ul>
<li>Your primary colour – a neutral colour, </li>
<li>Your secondary colour – a colour that supports the primary colour, and </li>
<li>Your accent colour – a colour that pops! </li>
</ul>
<p>Whatever colours you decide to use for your design depend on the design objectives and the overall aesthetic you want to achieve. Remember that mastery of colours come with adequate practice. So make sure to practice more and you will see a lot of improvement in your usage of colours.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Div Background Color – How to Change Background Color in CSS ]]>
                </title>
                <description>
                    <![CDATA[ If you're working on a web development project, setting a nice background color can give the website a more enticing look.  To set a background color for a div or related element in CSS, you use the background-color property. While setting this backg... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/div-background-color-how-to-change-background-color-in-css/</link>
                <guid isPermaLink="false">66adf0b8febac312b73075aa</guid>
                
                    <category>
                        <![CDATA[ colors ]]>
                    </category>
                
                    <category>
                        <![CDATA[ CSS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ HTML ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Kolade Chris ]]>
                </dc:creator>
                <pubDate>Thu, 03 Feb 2022 16:50:46 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/02/backgroundcolor.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>If you're working on a web development project, setting a nice background color can give the website a more enticing look. </p>
<p>To set a background color for a <code>div</code> or related element in CSS, you use the <code>background-color</code> property.</p>
<p>While setting this background color, your creativity is your limit as to how far you want to go. </p>
<p>So in this article, I'm going to show you how you can set this background color.</p>
<h2 id="heading-how-to-set-background-color-with-named-colors">How to Set Background Color with Named Colors</h2>
<p>With named colors, you can set the background color by bringing in the <code>background-color</code> property and assigning it a value expressed in a color name like <code>red</code>, <code>green</code>, <code>blue</code>, and so on.</p>
<pre><code class="lang-css"> <span class="hljs-selector-tag">div</span> {
      <span class="hljs-attribute">background</span>: green;
    }
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/ss-1-1.png" alt="ss-1-1" width="600" height="400" loading="lazy"></p>
<p>You can use the following styles to make the web page look better. Just set a width and height for the <code>div</code>, so the background-color can take effect:</p>
<pre><code class="lang-css"><span class="hljs-selector-tag">body</span> {
   <span class="hljs-attribute">display</span>: flex;
   <span class="hljs-attribute">align-items</span>: center;
   <span class="hljs-attribute">justify-content</span>: center;
   <span class="hljs-attribute">height</span>: <span class="hljs-number">100vh</span>;
   <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#d3d3d3</span>;
 }

<span class="hljs-selector-tag">div</span> {
   <span class="hljs-attribute">background</span>: green;
 }
</code></pre>
<p>Modern browsers recognize around 147 colors, so you're still limited a little. </p>
<h2 id="heading-how-to-set-background-color-with-hexadecimal-colors">How to Set Background Color with Hexadecimal Colors</h2>
<p>With Hexadecimal values, you can set a background color for a <code>div</code> or any other element with a total of 6 characters. </p>
<p>Hex colors start with the hash sign (#), any number from 0 to 9, and finally any letter from A to F.</p>
<p>The first 2 values stand for red, the next two stand for green, and the last 2 represent blue. </p>
<p>With hex values, you can dive deep into the color wheel and even use colors no one has ever used.</p>
<pre><code class="lang-css"><span class="hljs-selector-tag">div</span> {
   <span class="hljs-attribute">background</span>: <span class="hljs-number">#2ecc71</span>;
 }
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/ss-2-1.png" alt="ss-2-1" width="600" height="400" loading="lazy"></p>
<p>You can <a target="_blank" href="https://www.freecodecamp.org/news/how-hex-code-colors-work-how-to-choose-colors-without-a-color-picker/">read more about hex colors here</a>.</p>
<h2 id="heading-how-to-set-background-color-with-rgb-colors">How to Set Background Color with RGB Colors</h2>
<p>RGB stands for Red Green, and Blue. </p>
<p>To set the background color with RGB, you specify the amount of red, green, and blue you want with numbers between 0 and 255.</p>
<pre><code class="lang-css"><span class="hljs-selector-tag">div</span> {
      <span class="hljs-attribute">background</span>: <span class="hljs-built_in">rgb</span>(<span class="hljs-number">220</span>, <span class="hljs-number">20</span>, <span class="hljs-number">60</span>);
    }
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/ss-3.png" alt="ss-3" width="600" height="400" loading="lazy"></p>
<p>RGB also has a variation called RGBA. The last A means alpha and it lets you determine how opaque you want the color to be.</p>
<p>The alpha takes a value from 0.0 to 1.0. 0.0 means 0% opacity, 0.5 means 50% opacity, and 1.0 means 100% opacity.</p>
<pre><code class="lang-css"><span class="hljs-selector-tag">div</span> {
    <span class="hljs-attribute">background</span>: <span class="hljs-built_in">rgb</span>(<span class="hljs-number">220</span>, <span class="hljs-number">20</span>, <span class="hljs-number">60</span>, <span class="hljs-number">0.6</span>);
 }
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/ss-4.png" alt="ss-4" width="600" height="400" loading="lazy"></p>
<p>You can <a target="_blank" href="https://www.freecodecamp.org/news/rgb-color-html-and-css-guide/">read more about RGB colors here</a>.</p>
<h2 id="heading-how-to-set-background-color-with-hsl-colors">How to Set Background Color with HSL Colors</h2>
<p>HSL stands for Hue, Saturation, and Lightness. It is the most dynamic within the ways you can specify a background color for a <code>div</code> or other elements.  </p>
<ul>
<li><strong>Hue</strong> represents the color wheel in 360°. 0° is red, 120° is green and 240° is blue</li>
<li><strong>Saturation</strong> is the amount of gray in the color expressed in percentages. 0% is the shade of gray and 100% is the color itself.</li>
<li>As the name implies, <strong>lightness</strong> is the amount of darkness and lightness in the color expressed as a percentage. 0% is black and 100% is white.<pre><code class="lang-css"><span class="hljs-selector-tag">div</span> {
 <span class="hljs-attribute">background</span>: <span class="hljs-built_in">hsl</span>(<span class="hljs-number">16</span>, <span class="hljs-number">100%</span>, <span class="hljs-number">50%</span>);
}
</code></pre>
<img src="https://www.freecodecamp.org/news/content/images/2022/02/ss-5.png" alt="ss-5" width="600" height="400" loading="lazy"></li>
</ul>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Since you can apply colors in 4 different ways, you must be wondering which one you should use. </p>
<p>When you use named colors, you're kind of limited in how far you can go in applying different shades of colors. </p>
<p>Each color like red, green, blue, yellow, or any other color has a lot of variations you won't get access to with named colors. </p>
<p>You can only access about 147 predefined colors recognized by browsers.
Hexadecimal colors, on the other hand, are very dynamic. They are mostly used among developers, and creativity is the limit. These hex colors allow you to use different shades of the same color.</p>
<p>RGB colors are as dynamic as hexadecimal colors. You can specify the amount of red, green, and blue from 0 to 255, and you can also use the added alpha value to specify the transparency of the color.</p>
<p>HSL is the most dynamic of all of them. You can specify exactly the color from 0 to 360 degrees in the color wheel, set the saturation and darkness as a percentage, and set the opacity to any value between 0.0 and 1.0.  </p>
<p>So deciding which to use between named, hex, RGB and HSL colors depends on you and how creative you want to be and what your project's needs are.</p>
<p>Thank you for reading.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Color Shades – Hex Code and RGB for Gray Color Palette ]]>
                </title>
                <description>
                    <![CDATA[ Colors play an integral role in how usable and accessible your web design projects are. At times, they can even make or break a project. Having a color palette comprised of different shades and hues of a specific color can be really helpful. It helps... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/color-shades-hex-code-and-rgb-for-gray-color-palette/</link>
                <guid isPermaLink="false">66b1e3d488a49cff617991df</guid>
                
                    <category>
                        <![CDATA[ colors ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Dionysia Lemonaki ]]>
                </dc:creator>
                <pubDate>Wed, 24 Nov 2021 23:47:39 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/11/russn_fckr-krV5aS4jDjA-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Colors play an integral role in how usable and accessible your web design projects are.</p>
<p>At times, they can even make or break a project.</p>
<p>Having a color palette comprised of different shades and hues of a specific color can be really helpful. It helps you visualize how you can combine the colors you want to add to your designs to create a harmonious effect.</p>
<p>This article briefly goes over how to add colors in HTML and shows a table with different hues of the color gray.</p>
<p>If you're interested in only viewing the table with the different shades of gray,<a class="post-section-overview" href="#table">here is the link to that</a>.</p>
<h2 id="heading-how-to-write-colors-in-html">How to write colors in HTML</h2>
<p>HTML (or HyperText Markup Language) lets you add different content to a page and create structure. </p>
<p>The headings, paragraphs, images, and links you see on a webpage are all HTML code. </p>
<p>All HTML code is written in its own file. That file has an <code>.html</code> extension.</p>
<p>When you want to style the content you added with HTML, you use CSS (or Cascading Style Sheets).</p>
<p>It is best practice to keep the content and the styles separate, and write HTML and CSS code in different files. This is what is called <em>separation of concerns</em>.</p>
<p>So, you'll add your CSS code in a file with the <code>.css</code> extension.</p>
<p>To change the color of text, or the foreground color of elements, you use the <code>color</code> property. </p>
<p>When you want to change the background color of an element, you use the <code>background-color</code> property.</p>
<h3 id="heading-hex-codes">Hex Codes</h3>
<p>There are a few different options you can choose from to add the color you want.</p>
<p>Some of those are either using the color name, the HEX code or the RGB value that corresponds to a specific color.</p>
<p>HEX codes are alphanumeric characters.</p>
<p>A hexadecimal digit can be one of 16 possible values, ranging from 0 - 9 and a - f.</p>
<p>The codes are preceded by a <code>#</code>, like for example: <code>#ffffff</code>, which is the color white.</p>
<h3 id="heading-rgb-colors">RGB Colors</h3>
<p>The RGB color values are among the most popular and widely used color models.</p>
<p>Each color is a combination of Red, Green, and Blue, with each color ranging from 0 (the lowest) to 255 (the highest).</p>
<p>The general syntax looks something like this: <code>rgb(red, green, blue)</code>, like this example: <code>rgb(0, 0, 255)</code>. </p>
<p>Because the numbers for the Red and Green places are 0 (meaning there is no color there), and the highest number is the the Blue place, it means that the color is pure Blue.</p>
<p>Here is an example using all three to change paragraph text to have a red color.</p>
<p>All three rules will have the exact same result visually:</p>
<pre><code class="lang-css"><span class="hljs-comment">/* using the color name */</span>
<span class="hljs-selector-tag">p</span> {
<span class="hljs-attribute">color</span>: red;
}

<span class="hljs-comment">/* using the HEX code for red */</span>
<span class="hljs-selector-tag">p</span> {
<span class="hljs-attribute">color</span>:    <span class="hljs-number">#FF0000</span>;
}

<span class="hljs-comment">/* using the RGB value for red */</span>
<span class="hljs-selector-tag">p</span> {
<span class="hljs-attribute">color</span>: <span class="hljs-built_in">rgb</span>(<span class="hljs-number">255</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>);
}
</code></pre>
<p>You can learn more about <a target="_blank" href="https://www.freecodecamp.org/news/how-hex-code-colors-work-how-to-choose-colors-without-a-color-picker/">HEX codes here</a> and <a target="_blank" href="https://www.freecodecamp.org/news/rgb-color-html-and-css-guide/">RGB colors here</a>.</p>
<h2 id="heading-the-gray-color-palette">The gray color palette <a></a></h2>
<p>Below is a table with a wide spectrum of some of the shades of gray recognized in HTML, ranging from darkest to lighest, with their respective HEX codes and RGB values.</p>
<p>Look through and choose any of the colors to use in your next web design project.</p>
<table>
<tbody><tr>
<th>Gray Shades</th>
<th>HEX Codes</th>
<th>RGB Values</th>
</tr>

    <tr>
    <td></td>
    <td>#111111</td>
    <td>rgb(17, 17, 17)</td>
</tr>


    <tr>
    <td></td>
    <td>#121212</td>
    <td>rgb(18, 18, 18)</td>
</tr>

    <tr>
    <td></td>
    <td>#161618</td>
    <td>rgb(22, 22, 24)</td>
</tr>

    <tr>
    <td></td>
    <td>#181818</td>
    <td>rgb(24, 24, 24)</td>
</tr>

    <tr>
    <td></td>
    <td>#212121</td>
    <td>rgb(33, 33, 33)</td>
</tr>

    <tr>
    <td></td>
    <td>#212124</td>
    <td>rgb(33, 33, 36)</td>
</tr>

    <tr>
    <td></td>
    <td>#242526</td>
    <td>rgb(36, 37, 38)</td>
</tr>

    <tr>
    <td></td>
    <td>#282828</td>
    <td>rgb(40, 40, 40)</td>
</tr>

    <tr>
    <td></td>
    <td>#2F4F4F</td>
    <td>rgb(47,79,79)</td>
</tr>

    <tr>
    <td></td>
    <td>#333333</td>
    <td>rgb(51, 51, 51)</td>
</tr>

    <tr>
    <td></td>
    <td>#36454F</td>
    <td>rgb(54, 69, 79)</td>
</tr>

    <tr>
    <td></td>
    <td>#3A3B3C</td>
    <td>rgb(58, 59, 60)</td>
</tr>

<tr>
    <td></td>
    <td>#3B3B3B</td>
    <td>rgb(59, 59, 59)</td>
</tr>

    <tr>
    <td></td>
    <td>#3D3D3D</td>
    <td>rgb(61, 61, 61)</td>
</tr>

     <tr>
    <td></td>
    <td>#404040</td>
    <td>rgb(64, 64, 64)</td>
</tr>

    <tr>
    <td></td>
    <td>#494848</td>
    <td>rgb(73, 72, 72)</td>
</tr>

<tr>
    <td></td>
    <td>#525252</td>
    <td>rgb(82, 82, 82)</td>
</tr>

    <tr>
    <td></td>
    <td>#555555</td>
    <td>rgb(85, 85, 85)</td>
</tr>

     <tr>
    <td></td>
    <td>#6082B6</td>
    <td>rgb(96, 130, 182)</td>
</tr>

    <tr>
    <td></td>
    <td>#616161</td>
    <td>rgb(97, 97, 97)</td>
</tr>


    <tr>
    <td></td>
    <td>#636363</td>
    <td>rgb(99, 99, 99)</td>
</tr>

 <tr>
    <td></td>
    <td>#6D6D64</td>
    <td>rgb(109, 109, 100)</td>
</tr>


 <tr>
    <td></td>
    <td>#696969</td>
    <td>rgb(105, 105, 105)</td>
</tr>

    <tr>
    <td></td>
    <td>#708090</td>
    <td>rgb(112, 128, 144)</td>
</tr>

    <tr>
    <td></td>
    <td>#71797E</td>
    <td>rgb(113, 121, 126)</td>
</tr>

    <tr>
    <td></td>
    <td>#7393B3</td>
    <td>rgb(115, 147, 179)</td>
</tr>

    <tr>
    <td></td>
    <td>#777777</td>
    <td>rgb(119, 119, 119)</td>
</tr>

    <tr>
    <td></td>
    <td>#778899</td>
    <td>rgb(119,136,153</td>
</tr>

   <tr>
    <td></td>
    <td>#7E7E7E</td>
    <td>rgb(126, 126, 126)</td>
</tr> 

 <tr>
    <td></td>
    <td>#808080</td>
    <td>rgb(128, 128, 128)</td>
</tr>


    <tr>
    <td></td>
    <td>#818181</td>
    <td>rgb(129, 129, 129)</td>
</tr>

    <tr>
    <td></td>
    <td>#818589</td>
    <td>rgb(129, 133, 137)</td>
</tr>

    <tr>
    <td></td>
    <td>#848884</td>
    <td>rgb(132, 136, 132)</td>
</tr>

    <tr>
    <td></td>
    <td>#888888</td>
    <td>rgb(136, 136, 136)</td>
</tr>

    <tr>
    <td></td>
    <td>#899499</td>
    <td>rgb(137, 148, 153)</td>
</tr>

    <tr>
    <td></td>
    <td>#8A9A5B</td>
    <td>rgb(138, 154, 91)</td>
</tr>

    <tr>
    <td></td>
    <td>#8B8B81</td>
    <td>rgb(139, 139, 129)</td>
</tr>

    <tr>
    <td></td>
    <td>#8C8C8C</td>
    <td>rgb(140, 140, 140)</td>
</tr>

      <tr>
    <td></td>
    <td>#909090</td>
    <td>rgb(144, 144, 144)</td>
</tr>

    <tr>
    <td></td>
    <td>#979797</td>
    <td>rgb(151, 151, 151)</td>
</tr>

    <tr>
    <td></td>
    <td>#999999</td>
    <td>rgb(153,153,153)</td>
</tr>

  <tr>
    <td></td>
    <td>#A9A9A9</td>
    <td>rgb(169, 169, 169)</td>
</tr>

     <tr>
    <td></td>
    <td>#AAAAAA</td>
    <td>rgb(170, 170, 170)</td>
</tr>

     <tr>
    <td></td>
    <td>#AEAEAE</td>
    <td>rgb(174, 174, 174)</td>
</tr>

    <tr>
    <td></td>
    <td>#B0B3B8</td>
    <td>rgb(176, 179, 184)</td>
</tr>

     <tr>
    <td></td>
    <td>#B2BEB5</td>
    <td>rgb(178, 190, 181)</td>
</tr>

     <tr>
    <td></td>
    <td>#B3B3B3</td>
    <td>rgb(179, 179, 179)</td>
</tr>

     <tr>
    <td></td>
    <td>#B4B4B4</td>
    <td>rgb(180, 180, 180)</td>
</tr>

     <tr>
    <td></td>
    <td>#BBBBBB</td>
    <td>rgb(187, 187, 187)</td>
</tr>


     <tr>
    <td></td>
    <td>#BFBFBF</td>
    <td>rgb(191, 191, 191)</td>
</tr>

    <tr>
    <td></td>
    <td>#C0C0C0</td>
    <td>rgb(192, 192, 192)</td>
</tr>

    <tr>
    <td></td>
    <td>#C5C5C5</td>
    <td>rgb(197, 197, 197)</td>
</tr>

    <tr>
    <td></td>
    <td>#CCCCCC</td>
    <td>rgb(204, 204, 204)</td>
</tr>

    <tr>
    <td></td>
    <td>#D3D3D3</td>
    <td>rgb(211, 211, 211)</td>
</tr>

     <tr>
    <td></td>
    <td>#D4D4D4</td>
    <td>rgb(212, 212, 212)</td>
</tr>

     <tr>
    <td></td>
    <td>#DCDCDC</td>
    <td>rgb(220,220,220)</td>
</tr>

    <tr>
    <td></td>
    <td>#DDDDDD</td>
    <td>rgb(221, 221, 221)</td>
</tr>

    <tr>
    <td></td>
    <td>#E4E6EB</td>
    <td>rgb(228, 230, 235)</td>
</tr>

     <tr>
    <td></td>
    <td>#E5E4E2</td>
    <td>rgb(229, 228, 226)</td>
</tr>

    <tr>
    <td></td>
    <td>#EEEEEE</td>
    <td>rgb(238, 238, 238)</td>
</tr>


    <tr>
    <td></td>
    <td>#F2F2F2</td>
    <td>rgb(242, 242, 242)</td>
</tr>

    <tr>
    <td></td>
    <td>#F5F5F5</td>
    <td>rgb(245, 245, 245)</td>
</tr>
</tbody></table>


<h2 id="heading-conclusion">Conclusion</h2>
<p>I hope you found this article helpful and found some inspiration for your next design project.</p>
<p>If you're interested in learning more about CSS and front-end web development, check out freeCodeCamp's <a target="_blank" href="https://www.freecodecamp.org/learn/responsive-web-design/">responsive web design certification</a>. In it, you'll build 5 projects for your portfolio while learning web development fundamentals.</p>
<p>Thanks for reading and happy coding!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ CSS Font Color – How to Style Text in HTML ]]>
                </title>
                <description>
                    <![CDATA[ Setting text color on a website you're building might be confusing at first. But in this article, you'll learn how to do it. How to Set Text Color in HTML In CSS, the background-color property is pretty straightforward for setting the background colo... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/css-font-color-how-to-style-text-in-html/</link>
                <guid isPermaLink="false">66adf09bfebac312b730759f</guid>
                
                    <category>
                        <![CDATA[ colors ]]>
                    </category>
                
                    <category>
                        <![CDATA[ CSS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ fonts ]]>
                    </category>
                
                    <category>
                        <![CDATA[ HTML ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Kolade Chris ]]>
                </dc:creator>
                <pubDate>Wed, 01 Sep 2021 17:27:17 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/09/Cssfontcolor.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Setting text color on a website you're building might be confusing at first. But in this article, you'll learn how to do it.</p>
<h2 id="heading-how-to-set-text-color-in-html">How to Set Text Color in HTML</h2>
<p>In CSS, the <code>background-color</code> property is pretty straightforward for setting the background color of anything. </p>
<p>So what if you want to set the foreground color of something on the page? Especially text, which under normal conditions you wouldn't want to set a background color for. </p>
<p>There's no <code>foreground-color</code> property in CSS, so what makes this possible is the <code>color</code> property.</p>
<p>In this article, I will walk you through how to set the color of text using the color property. We'll also look at the various ways it takes values.</p>
<p>The color property takes values in 4 different ways: named color, hexadecimal color, RGB color, and HSL color. Let's look at each one now.</p>
<h2 id="heading-named-colors">Named Colors</h2>
<p>As the name implies, you bring in the color property and apply the value by naming the color you want. This may be red, green, blue, orange, crimson, cyan, or any other named color. There are around 147 named colors recognized by browsers. </p>
<p>The basic syntax looks like this:</p>
<pre><code class="lang-css"><span class="hljs-selector-tag">element</span> {
    <span class="hljs-attribute">color</span>: colorName
}
</code></pre>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>freeCodeCamp<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<pre><code class="lang-css"> <span class="hljs-selector-tag">p</span> {
     <span class="hljs-attribute">color</span>: crimson;
}
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/09/named-color.png" alt="named-color" width="600" height="400" loading="lazy"></p>
<h2 id="heading-hexadecimal-colors-or-just-hex-colors">Hexadecimal Colors (or just Hex Colors)</h2>
<p>Hex values are used to represent colors with a total of 6 characters. They start with the pound/number sign (#), then any number from 0 to 9, and finally any letter from A to F.</p>
<p>The first 2 values stand for red, the next two stand for green, and the last 2 represent blue. With hex values, there's no limit to the shades of colors you can use.</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>freeCodeCamp<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<pre><code class="lang-css"> <span class="hljs-selector-tag">p</span> {
    <span class="hljs-attribute">color</span>: <span class="hljs-number">#dc143c</span>;
 }
</code></pre>
<h2 id="heading-rgb-colors">RGB Colors</h2>
<p>RGB stands for red, green, and blue. With RGB colosr, you specify the color in terms of how much red, green, and blue you want. All three are expressed with numbers between 0 and 255.</p>
<p>There is a type of RGB called <code>rgba</code>. The extra ‘a’ stands for alpha, which lets you specify the opacity of the color. It takes a value from 0.0 to 1.0 – 0.0 means 0% opacity, 0.5 means 50% opacity, and 1.0 means 100% opacity.</p>
<p>The basic syntax is <code>rgba(amountOfRed, amountOfGreen, amountOfBlue, alpha)</code>. </p>
<p>You can limit it to <code>rgba(amountOfRed, amountOfGreen, amountOfBlue)</code> if you don't want an alpha value.</p>
<p>Here's the syntax for the regular RGB values:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>freeCodeCamp<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<pre><code class="lang-css"> <span class="hljs-selector-tag">p</span> {
   <span class="hljs-attribute">color</span>: <span class="hljs-built_in">rgb</span>(<span class="hljs-number">220</span>, <span class="hljs-number">20</span>, <span class="hljs-number">60</span>);
 }
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/09/rgb-color.png" alt="rgb-color" width="600" height="400" loading="lazy"></p>
<p>And here it is demonstrating the alpha value in action with 50% (0.5) opacity:</p>
<pre><code class="lang-css"><span class="hljs-selector-tag">p</span> {
    <span class="hljs-attribute">color</span>: <span class="hljs-built_in">rgb</span>(<span class="hljs-number">219</span>, <span class="hljs-number">20</span>, <span class="hljs-number">60</span>, <span class="hljs-number">0.5</span>);
}
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/09/rgb-fifty-percent-opacity.png" alt="rgb-fifty-percent-opacity" width="600" height="400" loading="lazy"></p>
<h2 id="heading-hsl-colors">HSL Colors</h2>
<p>HSL stands for hue, saturation, and lightness. It is another way of specifying color for text (and anything else that takes color) in CSS. </p>
<ul>
<li>Hue represents the color wheel in 360°. So, 0° is red, 120° is green and 240° is blue. </li>
<li>Saturation is the amount of gray in the color, expressed as a percentage. 0% is the shade of gray and 100% is the color itself.</li>
<li>Lightness is the amount of darkness and lightness in the color expressed as a percentage. 0% is black and 100% is white.</li>
</ul>
<p>Just like the RGB colors, you can also set the opacity of the color. So, there's also hsla.</p>
<p>The full basic syntax is <code>hsl(colorDegree, saturationPercentage, lightnessPercentage, alpha)</code>. You can limit it to <code>hsl(colorDegree, saturationPercentage, lightnessPercentage)</code> in case you don't want an alpha value.</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>freeCodeCamp<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<pre><code class="lang-css"> <span class="hljs-selector-tag">p</span> {
   <span class="hljs-attribute">color</span>: <span class="hljs-built_in">hsl</span>(<span class="hljs-number">348</span>, <span class="hljs-number">83%</span>, <span class="hljs-number">47%</span>);
 }
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/09/hsl-color.png" alt="hsl-color" width="600" height="400" loading="lazy"></p>
<p>You can apply a particular opacity to the hsl color like this:</p>
<pre><code class="lang-css"> <span class="hljs-selector-tag">p</span> {
   <span class="hljs-attribute">color</span>: <span class="hljs-built_in">hsla</span>(<span class="hljs-number">348</span>, <span class="hljs-number">83%</span>, <span class="hljs-number">47%</span>, <span class="hljs-number">0.5</span>);
  }
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/09/hsl-fifty-percent-opacity-1.png" alt="hsl-fifty-percent-opacity-1" width="600" height="400" loading="lazy"></p>
<h2 id="heading-should-you-use-named-colors-hex-colors-rgb-colors-or-hsl-colors-to-assign-colors">Should You Use Named Colors, Hex Colors, RGB Colors, or HSL Colors to Assign Colors?</h2>
<p>One of the wonderful things about CSS is that there are multiple ways of doing the same thing. You've seen this by applying colors to text. </p>
<p>Since you can apply colors in 4 different ways, you must be wondering which is the best to use.</p>
<p>When you use named colors, you're kind of limited in how far you can go in applying different shades of colors. Red, green, blue, yellow, or any other named color has a lot of variations you won't get access to with named colors. You'll only have access to around 147 predefined colors recognized by browsers.</p>
<p>Hexadecimal colors are very dynamic. They are the most commonly used among developers because your limit is your creativity. With hex colors, you can use various shades and even use a color no one has ever used.</p>
<p>RGB colors are as dynamic as hex colors. Apart from being able to specify how much red, green, and blue you want from 0 to 255, you can also set how transparent you want the color to be with the extra alpha value.</p>
<p>HSL is the most dynamic of all. You get to specify the exact color you want in degrees from 0 to 360 within the color wheel, set how saturated and dark you want it to be in percentages, and also set an opacity from 0.0 to 1.0.</p>
<p>So really, it's up to you and your use case – and just how creative or specific you want to get.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Applying colors to text helps make your website more attractive to visitors. The right color combo can also help your content become more readable too. </p>
<p>In this article, you have learned how to apply colors to text with the 4 different kinds of values you can use with the color property.</p>
<p>Thank you for reading, and keep coding.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ CSS Background Color – How to Change the Background Color in HTML ]]>
                </title>
                <description>
                    <![CDATA[ You have started creating your HTML page, and you want to give it some color – maybe change the color of the text or set a nice background. So how do you do that? In this article I'll show you how you can change the background color of a page ]]>
                </description>
                <link>https://www.freecodecamp.org/news/css-background-color-how-to-change-the-background-color-in-html/</link>
                <guid isPermaLink="false">66b0c37ec82f8da076e5b021</guid>
                
                    <category>
                        <![CDATA[ colors ]]>
                    </category>
                
                    <category>
                        <![CDATA[ CSS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ HTML ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Ilenia Magoni ]]>
                </dc:creator>
                <pubDate>Wed, 04 Aug 2021 14:46:14 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/08/html-background-color.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>You have started creating your HTML page, and you want to give it some color – maybe change the color of the text or set a nice background. So how do you do that?</p>
<p>In this article I'll show you how you can change the background color of a page in a few different ways.</p>
<h1 id="heading-how-to-change-the-background-color-of-an-html-element">How to Change the Background Color of an HTML Element</h1>
<p>You can change the background color of an HTML element using the <code>background-color</code> CSS property and giving it a value of a color.</p>
<pre><code class="lang-css"><span class="hljs-selector-tag">p</span> {
  <span class="hljs-attribute">background-color</span>: pink;
}
</code></pre>
<p>For example, this code will make all paragraph elements in your HTML file have a pink background because the <code>background-color</code> property has a value of <code>pink</code>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-16.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>There are about 140 color names that you can use, like <code>teal</code>, <code>hotpink</code>, <code>indigo</code> and many others.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-23.png" alt="Image" width="600" height="400" loading="lazy">
<em>A few of the possible color names you can use</em></p>
<p>Note: if you give a background-color to an element and don't see it change, it can be a syntax error, or it can also be that the element does not have a width or height. Try to put some content in it, or give it a width and an height using the CSS properties <code>width</code> and <code>height</code>.</p>
<p>There are actually almost 16.8 million colors that you can use. You can use all these colors using RGB values. There are also HSL colors where you have about 3.7 million colors to choose from. In the next section you will learn about all these different ways of creating colors.</p>
<h1 id="heading-different-color-notations">Different Color Notations</h1>
<p>The <code>background-color</code> property accepts colors as possible values. Here you will see four different notations for color values.</p>
<p>The first will be color names, and there are around 140 keywords that you can use. This is the easiest way to choose a color as it doesn't require understanding special notations – but it has a limited range of options.</p>
<p>The second and third ways to name or choose colors are RGB values and hexadecimal values. In these notations, colors are identified by the amount of red, green, and blue that they contain. </p>
<p>This comes from how a screen produces color. A screen is made of pixels, and each pixel is lighted by LEDs of three different colors, green, blue and red, that can shine at different intensities.</p>
<p>The fourth notation is HSL colors, or Hue-Saturation-Lightness. This notation comes from Graphic Design, as it reflects a more natural way for humans to think about color: a pure color (hue), of which saturation and lightness can be varied.</p>
<p>You can use any of these color notations to give a color to the background, but let's see them in more details, so you can choose the one you prefer.</p>
<h2 id="heading-html-color-names">HTML Color Names</h2>
<p>There are 16 basic colors recognised in the first version of HTML. Now there are 140+ named colors you can use.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-24.png" alt="Image" width="600" height="400" loading="lazy">
<em>The 16 basic colors</em></p>
<pre><code class="lang-css"><span class="hljs-selector-tag">body</span> {
  <span class="hljs-attribute">background-color</span>: black;
}
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-17.png" alt="Image" width="600" height="400" loading="lazy">
<em>An example of an HTML page with the <code>body</code> being given a <code>background-color</code> of <code>black</code></em></p>
<p>You can see all the named colors in the appendix at the end of the article.</p>
<h2 id="heading-rgb-colors">RGB Colors</h2>
<p>RGB stands for Red-Green-Blue. The colors in this format are written <code>rgb(0,0,0)</code>, where each value is a number between <code>0</code> and <code>255</code> representing the amount of red, green, and blue used to make each color, respectively. </p>
<p>For example, if you have <code>rgb(0,0,0)</code> you get black.</p>
<p>To get red, you write <code>rgb(255,0,0)</code>, where there is as much red as possible with <code>255</code>, <code>0</code> for blue, and <code>0</code> for green. </p>
<p>You can get other variations of red with small amounts of green and/or blue, and a bit less red. For example you can get an orange red with <code>rgb(255,69,0)</code> or a dark red with <code>rgb(139,0,0)</code>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-25.png" alt="Image" width="600" height="400" loading="lazy">
<em>The colors of the rgb values presented above.</em></p>
<pre><code class="lang-css"><span class="hljs-selector-tag">div</span> {
  <span class="hljs-attribute">background-color</span>: <span class="hljs-built_in">rgb</span>(<span class="hljs-number">139</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>);
}
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-18.png" alt="Image" width="600" height="400" loading="lazy">
<em>An example of an HTML page with the <code>div</code> element being given a <code>background-color</code> of <code>rgb(139,0,0)</code></em></p>
<p>Below an example of how the color changes when you adjust two of the RGB values: the top left corner of the colored square is equal to <code>rgb(0,0,0)</code>, the top right is equal to <code>rgb(0,0,255)</code>, the bottom left corner to <code>rgb(0,255,0)</code> and the bottom right corner to <code>rgb(0,255,255)</code>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-28.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Fortunately, you don't need to guess the numbers to get the color you want. You can find various color pickers online that let you choose the color with sliders (or other methods) and give you the RGB color value you want to use.</p>
<h2 id="heading-hexadecimal-colors">Hexadecimal Colors</h2>
<p>Hexadecimal colors are a different way to write RGB colors. With hexadecimals you also have three numbers, one for each color, with 256 possible values.</p>
<p>In this case, though, each color has two digits that go from <code>0</code> to <code>F</code> (that is,  <code>0</code>, <code>1</code>, <code>2</code>, <code>3</code>, <code>4</code>, <code>5</code>, <code>6</code>, <code>7</code>, <code>8</code>, <code>9</code>, and <code>A</code>, <code>B</code>, <code>C</code>, <code>D</code>, <code>E</code>, <code>F</code>). One single digit has 16 possible values, and two digits have 256 possible values, from <code>00</code>, to <code>FF</code> (255).</p>
<p>Hexadecimal colors are written with a <code>#</code> in front of the value. Red is written as <code>#FF0000</code>, dark red as <code>#8B0000</code>, and orange red as <code>#FF4500</code>, for example.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-2.png" alt="Image" width="600" height="400" loading="lazy">
<em>The colors mentioned in the section above.</em></p>
<pre><code>h1 {
  background-color: #FF4500;
}
</code></pre><p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-19.png" alt="Image" width="600" height="400" loading="lazy">
<em>An example of an HTML page with the <code>h1</code> element being given a <code>background-color</code> of <code>#FF4500</code></em></p>
<p>You can also use color pickers to generate hexadecimal values.</p>
<h3 id="heading-hexadecimal-shorthand">Hexadecimal shorthand</h3>
<p>You can write hexadecimal numbers in shorthand form, using only three digits instead of six. For example, you can write red like <code>#F00</code>. This reduces the number of possible colors to just above 4,000, but it is shorter to write, and sometimes that is what is important.</p>
<p>Each digit is in place of two identical digits, so we can't write <code>#8B0000</code> in shorthand form, as <code>8</code> and <code>B</code> are not identical. But we can write <code>#800</code> which is equal to <code>#880000</code>, pretty similar to the other dark red. And orange red can be <code>#F40</code> (equal to <code>#FF4400</code>).</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-8.png" alt="Image" width="600" height="400" loading="lazy">
<em>The colors mentioned in the section above.</em></p>
<h2 id="heading-hsl-colors">HSL Colors</h2>
<p>HSL means Hue-Saturation-Lightness, and it is a completely different way of writing colors than what we have seen so far.</p>
<p>HSL colors are represented with three numbers: the hue goes from <code>0</code> to <code>360</code>, and saturation and lightness from <code>0</code> to <code>100</code>.</p>
<p>The hue determines the base color, and its value is an angle, a degree on the color wheel. In this case, red is <code>0</code>, green is <code>120</code>, blue is <code>240</code>, and <code>360</code> is again red.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-11.png" alt="Image" width="600" height="400" loading="lazy">
<em>All possible colors changing only the hue, with hue of 0 to the left and hue of 360 on the right.</em></p>
<p>Saturation goes from <code>0</code>, which makes the color gray, to <code>100</code>, which shows the full color.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-9.png" alt="Image" width="600" height="400" loading="lazy">
<em>Variation of saturation for red, 0% on the left, 100% on the right.</em></p>
<p>Lightness is the amount of black or white added to the color. <code>0</code> is black, <code>50</code> is the color itself, and <code>100</code> is white.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-10.png" alt="Image" width="600" height="400" loading="lazy">
<em>Variation of lightness, with 0% on the left, and 100% on the right.</em></p>
<p>For example, you'd write red as <code>hsl(0,100%,50%)</code>, orange red as <code>hsl(16,100%,50%)</code>, and dark red as <code>hsl(0,100%,27%)</code>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-26.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>It can be easier to find similar colors using HSL than with the other color schemes. With red and its variations you have seen that to get a darker red you can just change the lightness percentage, and mixing red with an other color is enough to change its hue value a bit.</p>
<p>Let's see it in action with a mixed color in hexadecimal, like orange (<code>#FFA500</code> or <code>rgb(255,166,0)</code>), written in HSL as <code>hsl(39,100%,50%)</code>. You can get a lighter orange just by increasing the lightness. </p>
<p>So for example you can write <code>hsl(39,100%,65%)</code> to get this lighter orange. With the other notations you would have needed to write <code>rgb(255,193,77)</code> or <code>#FFC14D</code>. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-27.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-20.png" alt="Image" width="600" height="400" loading="lazy">
<em>An example of an HTML page with the <code>main</code> element being given a <code>background-color</code> of <code>hsl(39, 100%, 65%)</code></em></p>
<p>You can also find color pickers online for HSL colors.</p>
<h1 id="heading-property-name-short-hand">Property name short-hand</h1>
<p>You can also set the background color using the short-hand <code>background</code> property.</p>
<pre><code class="lang-css"><span class="hljs-selector-tag">p</span> {
  <span class="hljs-attribute">background</span>: pink;
}

<span class="hljs-selector-tag">body</span> {
  <span class="hljs-attribute">background</span>: black;
}

<span class="hljs-selector-tag">div</span> {
  <span class="hljs-attribute">background</span>: <span class="hljs-built_in">rgb</span>(<span class="hljs-number">139</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>);
}

<span class="hljs-selector-tag">h1</span> {
  <span class="hljs-attribute">background</span>: <span class="hljs-number">#FF4500</span>;
}

<span class="hljs-selector-tag">main</span> {
  <span class="hljs-attribute">background</span>: <span class="hljs-built_in">hsl</span>(<span class="hljs-number">39</span>,<span class="hljs-number">100%</span>,<span class="hljs-number">65%</span>);
}
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-21.png" alt="Image" width="600" height="400" loading="lazy">
<em>An example of an HTML page with all the elements being given a background color.</em></p>
<p>This is a more versatile property, <a target="_blank" href="https://www.freecodecamp.org/news/learn-css-background-properties/">as it is shorthand for various <code>background</code> properties</a>, like <code>background-image</code> and <code>background-position</code>. When you use it with a color value it works exactly the same as <code>background-color</code>.</p>
<h1 id="heading-conclusion">Conclusion</h1>
<p>You have learned how to give a background color to your HTML elements using the <code>background-color</code> property and its shorthand <code>background</code>, and using different color notations. </p>
<p>Now you have all the tools you need to add whatever colors you want to your web pages. Enjoy!</p>
<h1 id="heading-appendix">Appendix</h1>
<h2 id="heading-all-140-named-colors">All 140+ named colors</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/CodePen-colored-squares-2.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-spelling-variations">Spelling Variations</h2>
<p>The color names containing the word "Gray" can also be written with the spelling "Grey" as shown below.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/image-22.png" alt="Image" width="600" height="400" loading="lazy"></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ RGB Color – HTML and CSS Guide ]]>
                </title>
                <description>
                    <![CDATA[ Choosing the right color for your web design project is a serious endeavour. A color scheme can often make or break a site's overall appearance. Different colors create a different feel for your designs. The right choice of colors can make your desig... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/rgb-color-html-and-css-guide/</link>
                <guid isPermaLink="false">66b1e4ae6500ee13f33bd58e</guid>
                
                    <category>
                        <![CDATA[ colors ]]>
                    </category>
                
                    <category>
                        <![CDATA[ CSS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ HTML ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Dionysia Lemonaki ]]>
                </dc:creator>
                <pubDate>Mon, 19 Jul 2021 19:00:35 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/07/alice-dietrich-FwF_fKj5tBo-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Choosing the right color for your web design project is a serious endeavour. A color scheme can often make or break a site's overall appearance.</p>
<p>Different colors create a different feel for your designs. The right choice of colors can make your designs and creations look clean, aesthetically pleasing, and modern. But the wrong colors can make a project look garish, hard on the eyes, and can be difficult for users to interact with.</p>
<p>The color of the border (<code>border</code>), the background (<code>background-color</code>), or of the foreground (<code>color</code>) – the text and text decorations on the page – have a huge impact, so you should put in some effort to get them right.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/07/rhondak-native-florida-folk-artist-_Yc7OtfFn-0-unsplash.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Image from <a target="_blank" href="https://unsplash.com/">Unsplash</a></em></p>
<p>CSS lets you use of a wide variety of different colors and color systems. They range from named colors, to hex colors, rgb() colors, hsl colors and more.</p>
<h2 id="heading-how-to-use-colors-in-html">How to Use Colors in HTML</h2>
<p>The easiest way to apply color to your HTML elements is to write your HTML in a <code>.html</code> file. Then in that file you just link your <code>.css</code> stylesheet with all the colors and styles you specify. </p>
<p>This makes your code easier to read and <em>sepates concerns</em>, which is considered a best practise.</p>
<p>We can have a file, <code>about.html</code>, with some HTML code like this: </p>
<pre><code class="lang-html"><span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">html</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">"en"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">http-equiv</span>=<span class="hljs-string">"X-UA-Compatible"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"IE=edge"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"viewport"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"width=device-width, initial-scale=1.0"</span>&gt;</span>
    <span class="hljs-comment">&lt;!-- link to our css styles --&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"stylesheet"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"style.css"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>About Me<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
     <span class="hljs-tag">&lt;<span class="hljs-name">section</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"intro"</span>&gt;</span>
     <span class="hljs-tag">&lt;<span class="hljs-name">h2</span>&gt;</span>About Me<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span>
     <span class="hljs-tag">&lt;/<span class="hljs-name">section</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>
<p>Then in our <code>style.css</code> we can add the following:</p>
<pre><code class="lang-css">
<span class="hljs-selector-class">.intro</span> {
 <span class="hljs-comment">/* changes color of  background */</span>
  <span class="hljs-attribute">background-color</span>: <span class="hljs-built_in">rgb</span>(<span class="hljs-number">232</span>, <span class="hljs-number">206</span>, <span class="hljs-number">191</span>);
  <span class="hljs-attribute">max-width</span>: <span class="hljs-number">620px</span>;
  <span class="hljs-attribute">height</span>: <span class="hljs-number">100px</span>;
  <span class="hljs-attribute">padding</span>: <span class="hljs-number">5px</span>;
  <span class="hljs-attribute">margin</span>: <span class="hljs-number">70px</span> auto;
}

<span class="hljs-selector-tag">h2</span> {
<span class="hljs-comment">/* changes color of text   */</span>
  <span class="hljs-attribute">color</span>: <span class="hljs-built_in">rgb</span>(<span class="hljs-number">79</span>, <span class="hljs-number">72</span>, <span class="hljs-number">70</span>);
  <span class="hljs-attribute">text-align</span>:center;
}
</code></pre>
<p>These styles look something like this when we load them in the browser:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/07/Screenshot-2021-07-19-at-3.36.33-PM.png" alt="Screenshot-2021-07-19-at-3.36.33-PM" width="600" height="400" loading="lazy"></p>
<p>In this example, we used <code>rgb</code> color values to change the colors on the page.   </p>
<p>This article primarily covers the <code>rgb()</code> color model. It makes some comparisons with <code>named colors</code> and <code>hex colors</code>, weighing the pros and cons of each, and discusses some differences and similarities between these different color systems.</p>
<h2 id="heading-what-are-named-colors-in-css">What are Named Colors in CSS?</h2>
<p>Named colors are English words, known as <em>keyword colors</em>. And they're pretty straightforward to use. </p>
<p>In your CSS file, you declare the property you want to target and alter. You then use one of the set and specified color names.</p>
<pre><code class="lang-css">
<span class="hljs-selector-tag">h2</span> {
    <span class="hljs-attribute">color</span>: cyan;
    }
</code></pre>
<p>The code above will make every <code>h2</code> element in your HTML have a text color value of <code>cyan</code>.</p>
<p>There are approximately 140 named colors that modern browsers support. So your choices are relatively limited and there is not much variety available. </p>
<p>With named colors, we are not able to harness the true power of CSS. So let's look at some other options.</p>
<h2 id="heading-numerically-named-color-systems">Numerically Named Color Systems</h2>
<p>In this case, colors are described with a number system. This allows you to make the most of the whole spectrum of colors available. </p>
<p>Most computer screens use a mix of red, green, and blue colors combined together.</p>
<p>Both <code>hex colors</code> and <code>rgb()</code> colors use a combination of red, green, and blue to create different hues. They work in the same way – the only differences are the numeric systems they use and their syntax.</p>
<p>So let's look at each system in a bit more depth.</p>
<h2 id="heading-what-are-hexadecimal-colors-in-css">What are Hexadecimal Colors in CSS?</h2>
<p>Computers count in the hexadecimal counting system compared to we humans who use the decimal counting system.</p>
<p>This system is comprised of alphanumeric values which include these characters : <code>0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f</code>.</p>
<p>A hex color starts with a <code>#</code> to denote that it is indeed a hex color and is then followed by <code>6</code> of the characters mentioned above. </p>
<p>These numbers and letters represent the amount of <code>red, green, and blue</code> in the color.</p>
<p>Converting the keyword color, <code>cyan</code>, from earlier to it's equivalent hex color value would be:</p>
<pre><code class="lang-css">
<span class="hljs-selector-tag">h2</span> {
    #00ffff;
    }
</code></pre>
<p>The first pair (<code>00</code>) represents the amount of red. The next pair (<code>ff</code>) represents the amount of green. And the last one (<code>ff</code>) represents the amount of blue.</p>
<p>The minimum value hex colors can use is <code>00</code> which is fully off, and the maxiumum value is <code>ff</code> which is fully on.</p>
<p>The color white in hex is <code>#FFFFFF</code> or <code>FFF</code> for its shorthand notation and the color black is <code>#000000</code> or <code>#000</code>.</p>
<h2 id="heading-what-is-the-rgb-color-model">What is The RGB Color Model?</h2>
<p>Generally, <code>hex</code> colors and <code>rgb</code> colors are identical – they just use a different numeric system and syntax (but the colors are exactly the same).</p>
<p>It really just comes down to personal preference which one you choose to use.</p>
<p><code>RGB</code> is an acronym that stands for <code>Red Green Blue</code>.</p>
<p>Instead of using six hexadecimal characters like we did for the hex color values, with RGB each parameter pair defines the intensity and brightness of each color (red, green, and blue), with an integer number ranging from <code>0-255</code> or a percantage ranging from (0% - 100%).</p>
<p>It expresses colors in terms of the amount of red, green, and blue they are made up of and uses a human counting system in comparisson to hex colors that speak computer language.</p>
<p>The number is a code to represent how dark or bright the color is.</p>
<p>The minimum value of <code>0</code> represents that none of the color is being shown, so it is at its darkest. On the other hand, the maximum value of <code>255</code> represents that the full amount of color and the full intensity is on display.</p>
<h3 id="heading-rgb-color-syntax">RGB Color Syntax</h3>
<p>The general look of an <code>rgb</code> declaration is <code>rgb(red,green,blue);</code></p>
<p>RGB has the following syntax:</p>
<ul>
<li>the keyword <code>rgb</code> followed by a set of parentheses <code>()</code></li>
<li>three numeric decimal values sepated by commas inside the parentheses (which represent the three colors), </li>
<li>and finally it ends with a semicolon.</li>
</ul>
<p>Make sure you don't leave any spaces between anything.</p>
<p>Taking again the <code>cyan</code> example, the equivalent <code>rgb</code> code is:</p>
<pre><code class="lang-css">
<span class="hljs-selector-tag">h2</span> {
    <span class="hljs-attribute">color</span>:  <span class="hljs-built_in">rgb</span>(<span class="hljs-number">0</span>,<span class="hljs-number">255</span>,<span class="hljs-number">255</span>);
    }
</code></pre>
<p>The color red is not showing whereas green and blue are at their brightest and at their max. </p>
<ul>
<li>White is <code>rgb(255,255,255)</code> </li>
<li>Black is <code>rgb(0,0,0)</code></li>
<li>Red is  <code>rgb(255,0,0)</code></li>
<li>Green is <code>rgb(0,255,0)</code></li>
<li>Blue is <code>rgb(0,0,255)</code></li>
</ul>
<h3 id="heading-lots-of-options-with-rgb">Lots of Options with RGB</h3>
<p>With RGB, each value is mixed in with the rest and together they create a wide range of hues. You can even create new color combinations, making it the designer's dream. </p>
<p>In the <code>rgb</code> color system, there are three values you can use, and each value can be one of 256 possible values.</p>
<p>That makes for 256 <em> 256 </em> 256 = 16,777,216 color options in total to choose from!</p>
<h3 id="heading-rgb-opacity">RGB Opacity</h3>
<p>By default all <code>rgb</code> colors are fully opaque.</p>
<p>We have the ability to make colors more transparent by changing the opacity with the <code>rgba()</code> selector.</p>
<p>The <code>rgb</code> part stays the same, but the fourth value, <code>a</code> ,stands for <code>alpha</code>. </p>
<p>We can give <code>a</code> a number that is either <code>0</code> or <code>1</code> to describe how opaque we want our color to be. <code>0</code> is totally see-through and trasnparent and <code>1</code> is totally opaque.</p>
<p>We'll use the <code>cyan</code> example again, but this time we'll make it have half opacity.</p>
<pre><code class="lang-css">
<span class="hljs-selector-tag">h2</span> {
    <span class="hljs-attribute">color</span>:  <span class="hljs-built_in">rgba</span>(<span class="hljs-number">0</span>,<span class="hljs-number">255</span>,<span class="hljs-number">255</span>,<span class="hljs-number">0.5</span>);
    }
</code></pre>
<p>In CSS there is also the <code>opacity</code> selector. </p>
<p>We'll use the previous HTML and add the <code>opacity</code> selector to our <code>section</code> element with a class <code>.intro</code> in our CSS:</p>
<pre><code class="lang-css"><span class="hljs-selector-class">.intro</span> {
    <span class="hljs-attribute">background-color</span>: <span class="hljs-built_in">rgb</span>(<span class="hljs-number">232</span>, <span class="hljs-number">206</span>, <span class="hljs-number">191</span>);
    <span class="hljs-attribute">max-width</span>: <span class="hljs-number">620px</span>;
    <span class="hljs-attribute">height</span>: <span class="hljs-number">100px</span>;
    <span class="hljs-attribute">padding</span>: <span class="hljs-number">5px</span>;
    <span class="hljs-attribute">margin</span>: <span class="hljs-number">70px</span> auto;
    <span class="hljs-attribute">opacity</span>: <span class="hljs-number">0.3</span>;
    }
</code></pre>
<p>Notice that this makes the whole tag transparent, including the background, the heading, the heading's backgorund – everything.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/07/Screenshot-2021-07-19-at-4.21.54-PM.png" alt="Screenshot-2021-07-19-at-4.21.54-PM" width="600" height="400" loading="lazy"></p>
<p>The power of <code>rgba()</code> is that it allows us to make just the background see-through, for example, or we can make just the heading transparent. It will not affect the whole tag and all the content inside it.</p>
<p>Now if we remove the line from above and we update the <code>background-color</code> selector to <code>background-color: rgb(232, 206, 191,0.3);</code>, we see that it doesn't affect the heading:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/07/Screenshot-2021-07-19-at-4.25.18-PM.png" alt="Screenshot-2021-07-19-at-4.25.18-PM" width="600" height="400" loading="lazy"></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>I hope this has given you a good overview of the RGB color model, its syntax, and how it works. We also briefly compared it to other color models in CSS.</p>
<p>I hope you found this of value and thank you for reading.</p>
<p>Happy coding!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How Hex Code Colors Work – and How to Choose Colors Without A Color Picker ]]>
                </title>
                <description>
                    <![CDATA[ By Nahla Davies No matter what kind of coding project you are undertaking, chances are that at some point you’re going to start working with colors. This is particularly true if – as many people do – you learn to code using HTML to design web pages. ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-hex-code-colors-work-how-to-choose-colors-without-a-color-picker/</link>
                <guid isPermaLink="false">66d46042a326133d12440a3b</guid>
                
                    <category>
                        <![CDATA[ colors ]]>
                    </category>
                
                    <category>
                        <![CDATA[ HTML ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 26 Jan 2021 20:59:48 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/600f51370a2838549dcb7c79.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Nahla Davies</p>
<p>No matter what kind of coding project you are undertaking, chances are that at some point you’re going to start working with colors. This is particularly true if – as many people do – you learn to code using HTML to design web pages.</p>
<p>When you first start out <a target="_blank" href="https://www.freecodecamp.org/news/designing-in-color-abd358660a7b/">designing in color</a>, you’ll likely be using some kind of graphical interface to choose the colors you want to use before you apply them to the various elements in your page. </p>
<p>As you grow more confident in using HTML, though, and as you start to look at the code itself rather than just your graphical editor, you will notice that the colors you pick are denoted by some strange looking codes such as #ff0000.</p>
<p>These codes are called Hex color codes, and they are a fundamental part of the way that both HTML and CSS work. Learning how they function will not only save you a lot of time, it will also make your code faster, more elegant, and more reliable.</p>
<p>In this guide, we’ll take you through everything you need to know about hex color codes, and show you how to use them in your own project.</p>
<h2 id="heading-what-does-hexadecimal-mean">What Does Hexadecimal Mean?</h2>
<p>First, let’s look at the “hex” part of the term “hex color code”. Hex, in this context, stands for “hexadecimal”, a number system in which <a target="_blank" href="https://www.freecodecamp.org/news/hexadecimal-number-system/">there are 16 basic numerals</a>, rather than the more familiar 10. </p>
<p>This is the number system used by HTML, and many other programming languages for that matter, and so it is the way in which colors are recorded in the language.</p>
<p>Hexadecimal, as the name suggests, is a way of encoding a base 16 number system. Decimal, our regular number system you're already familiar with, is base 10. Hexadecimal uses the same numerals as the regular system for the first 10 numbers (so 0 – 9) and then swaps to letters, so the numbers 10 – 15 are encoded using the letters A – F.</p>
<p>As an interesting aside, the primary reason that hexadecimal is used is because it possesses a natural link to the binary system that is used by your computer at a more basic level. </p>
<p>Binary numbers are commonly expressed as a power of 2, and 16 is 2^4. This makes it easy to convert between hexadecimal and binary (though we won’t be doing that today).</p>
<p>You don’t need to know this to use hex color codes, but it might come in handy the next time you want to impress someone.</p>
<h2 id="heading-what-components-make-up-a-color">What Components Make Up a Color?</h2>
<p>How do we use the hexadecimal system to encode colors in RGB? </p>
<p>Colors that are displayed on a computer screen are made up of three components, which correspond to the three colors that are present in each pixel of your screen. If you look really, really closely (or you have an ancient screen) you’ll be able to see them – red, green, and blue.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/image-176.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://negliadesign.com/wordpress/assets/HEX-color-swatches-R-700x342.jpg?x96162">Source</a></em></p>
<p>As a consequence, the way that we encode colors is to specify how much light each of the red, green, and blue (RGB) parts of your pixels should give out. So, for instance, an RGB value (a type of value used in many different software systems) might look like this: RGB (255, 0, 0). </p>
<p>255 is the maximum value for a component, and so this value indicates that the first component (red, or R) should be at maximum, and the other two should be at minimum. And that will give us (you’ve guessed it) pure red. </p>
<p>(Incidentally, the reason that 255 is the maximum value is also related to the ease of using this value [or, actually, 256 including 0] in binary. 256 is 2^8. But that’s another factoid you really don’t need to know.)</p>
<p>The observant readers among you will already have spotted that, even at this stage, it’s pretty simple to work with colors in this form. Black, as an RGB value, is RGB (0,0,0), and white is RGB (255,255,255). Green? That’s right, RGB (0,255,0).</p>
<h2 id="heading-how-hex-colors-work">How Hex Colors Work</h2>
<p>Now that we know how colors work, we can look at a real hex color code. Take, for example, #ff0000, and let’s combine our knowledge from above to work out what it means. </p>
<p>Take a look at your hexadecimal table, and you’ll see that “FF” translates to “255” in standard, base-10 encoding. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/image-175.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank">Source</a></em></p>
<p>This should be a clue. The two first characters of this hex color code (and, in fact, all hex color codes) refer to the red component, and here the value is 255. The second two characters refer to the green component, and the last two to the blue. </p>
<p>From here, you can work out what #ff0000 means when translated to a color – it’s the same as RGB (255,0,0). That is, pure red. Similarly, #ff00ff indicates maximum red and blue simultaneously, which produces magenta:</p>
<p>It’s at this point that you might start to recognize the value and elegance of hex color codes. Because they use hexadecimal, and because 255 is the maximum value for a component, every possible color can be expressed using just 6 digits.</p>
<p>This system also means that there are a huge range of colors available, because each component can <a target="_blank" href="https://www.digitalcitizen.life/rgb-rgb-lighting/">take on any value from 0 to 255</a>. Do the math on the number of possible different combinations, and you’ll find that there are 16,777,216 colors available.</p>
<h2 id="heading-how-to-use-hex-code-abbreviations">How to Use Hex Code Abbreviations</h2>
<p>At this point, since you understand hex color codes, you can begin to use them in your web projects instead of using a color picker on your graphical interface. </p>
<p>However, before we get to that, it’s important to realize that these two options are not the only ones open to you. </p>
<p>HTML, because it was designed to be easy to use, also allows you to <a target="_blank" href="https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-use-abbreviated-hex-code/18338">use abbreviated hex codes</a>. Red, which is #FF0000 in hex code, can be shortened to #F00. That is, one digit for red, one digit for green, one digit for blue. Browsers will interpret #FF0000 and #F00 as exactly the same color. </p>
<p>This reduces the total number of possible colors to around 4,000. However, it has other advantages. </p>
<p>Just as you can <a target="_blank" href="https://hostingcanada.org/css-optimization/">use shorthand to optimize CSS delivery</a>, encoding your colors using abbreviations can improve the performance of your web pages. This might not be visible when working with small pages, but can have a significant impact as your projects get more complex.</p>
<h2 id="heading-how-to-use-your-own-hex-codes">How to Use Your Own Hex Codes</h2>
<p>At this point, you should be ready to start using hex codes instead of the color picker on your web design software. Most web builders will allow you to enter a hex code instead of clicking a color with a mouse, and taking this approach has several key advantages.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/image-177.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://miro.medium.com/max/1200/1*vgddUDH0yDIbUELtbEXV4g.png">Source</a></em></p>
<p>One is that it’s easier to keep track of which colors you are using. When designing using a color picker, it’s easy to accidentally use a color that is very close, and therefore all but indistinguishable, from the one you actually want. </p>
<p>This means that before you know it, your pages are in two similar but distinct shades of red. Using a hex code means you’ll get the same color every time.</p>
<p>Secondly, using hex codes allows you a fine level of control over your colors that is not possible with a color picker. </p>
<p>No color picker can contain all 16 million colors available to you when using HTML, but by writing your own color codes you can increment the shades that are available to you one value at a time.</p>
<p>Third, an understanding of the way that colors work on a computer screen is invaluable when it comes to designing web pages, or in fact any piece of software. With just a little insight into the way that your devices interpret code and displays colors, you can begin <a target="_blank" href="https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-use-hex-code-to-mix-colors/18359">using hex codes to mix colors</a>, and also ensure that the color you want to display is the one that actually appears on your users’ screens.</p>
<h2 id="heading-going-further">Going further</h2>
<p>Playing around with hex color codes in HTML might be fun, but it also has a serious objective. Almost all image manipulation software uses the same encoding, and so learning how hex color codes work will add a useful and fundamental skill to your coding knowledge. </p>
<p>Take a look at <a target="_blank" href="https://www.freecodecamp.org/news/how-jpg-works-a4dbd2316f35/">how JPG works</a>, for instance, and now you’ll already be familiar with some of the terminology. The next time you build a web page, drop the color picker, and code your colors by hand.  </p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to instantly make your front end projects look better ]]>
                </title>
                <description>
                    <![CDATA[ By Peter Gleeson We’ve all been there. You’ve been learning the basics of front end Web development, and you are keen to try out some new ideas. You take the time to code up the perfect HTML page, and add some styles and JavaScript for good measure. ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-make-your-front-end-projects/</link>
                <guid isPermaLink="false">66d460a3ffe6b1f641b5fa61</guid>
                
                    <category>
                        <![CDATA[ Bootstrap ]]>
                    </category>
                
                    <category>
                        <![CDATA[ colors ]]>
                    </category>
                
                    <category>
                        <![CDATA[ CSS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ front end ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Front-end Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ frontend ]]>
                    </category>
                
                    <category>
                        <![CDATA[ HTML ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 09 Mar 2020 11:07:00 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9c3f740569d1a4ca30eb.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Peter Gleeson</p>
<p>We’ve all been there. You’ve been learning the basics of front end Web development, and you are keen to try out some new ideas.</p>
<p>You take the time to code up the perfect HTML page, and add some styles and JavaScript for good measure.</p>
<p>Then you pause. Time to take a moment to step back and see how your efforts look in the browser.</p>
<p>Pretty terrible, right?</p>
<p>That was certainly my experience when I first learned a little front end development.</p>
<p>I’d put a lot of thought into the functionality of the site. But when I put everything together, it looked awful.</p>
<p>I wanted to share my work with a few friends to get feedback. But in its present state, my site wasn’t ready.</p>
<p>You see, functionality is only half the story. We humans for whatever reason are biased towards the appearance or presentation of something.</p>
<p>Perhaps we’re more likely to trust a site that appears professional and well-designed. Or maybe the aesthetic value of a well-designed site can help us overlook minor flaws in functionality.</p>
<p>Whatever the reason, something of a “<a target="_blank" href="https://en.wikipedia.org/wiki/Halo_effect">halo effect</a>” does exist in Web development.</p>
<p>In this article, you’ll learn a few easy tips to make your ugly af front end project look better in no time.</p>
<h3 id="heading-the-starting-point">The starting point</h3>
<p>Below is an example of a simple HTML page with no styling at all.</p>
<div class="embed-wrapper">
        <iframe width="100%" height="350" src="https://codepen.io/pg2020/embed/PoqOQmG" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="CodePen embed" scrolling="no" allowtransparency="true" allowfullscreen="true" loading="lazy"></iframe></div>
<p>This will be the starting point for the rest of the article. Each tip will build on top of the earlier ones until you have a better looking page to work with.</p>
<p>We’ll go in order of impact. That is, we’ll start with the tip that gives you the quickest improvement and make smaller and smaller gains as we go.</p>
<h3 id="heading-add-some-negative-space">Add some negative space</h3>
<p>The first tip is easy to picture, but needs to be put into practice carefully.</p>
<p>‘Negative space' refers to the empty space between elements on the page.</p>
<p>Getting the right amount of negative space goes a long way to making your page look better.</p>
<p>Specifically, it does two things:</p>
<ul>
<li>It makes the page less cluttered. It is easier to find the different elements, because the negative space helps them stand out from each other.</li>
<li>It makes better use of the available screen space. Spacing the elements out carefully can help fill parts of the screen that are more central, and reduce content in parts on the edges.</li>
</ul>
<p>Check the CSS in the example below. This adds some basic negative space to the simple example you saw earlier.</p>
<p>And here is the result:</p>
<div class="embed-wrapper">
        <iframe width="100%" height="350" src="https://codepen.io/pg2020/embed/oNXoEWK" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="CodePen embed" scrolling="no" allowtransparency="true" allowfullscreen="true" loading="lazy"></iframe></div>
<p>Notice what has happened here:</p>
<ul>
<li>Padding creates space within an element</li>
<li>Margin creates space between the elements</li>
<li>Line-size makes text less cluttered</li>
</ul>
<p>Too much empty space isn’t a good look. It can be tricky to get the balance right.</p>
<h3 id="heading-pair-your-fonts">Pair your fonts</h3>
<p>The next tip is another one with a quick impact.</p>
<p>The default system fonts are very safe and sensible. They are guaranteed to work.</p>
<p>But the choice of font makes a huge statement about the purpose and feel of your site.</p>
<ul>
<li>Light, playful fonts tell the viewer this page is fun and accessible</li>
<li>Sensible, simple fonts give a more business-like appearance</li>
<li>Traditional or display fonts give more of a timeless, classic look.</li>
</ul>
<p>You get the idea.</p>
<p>But how to put it into practice?</p>
<p>The key is to use font pairs.</p>
<p>The idea is that using two fonts for different elements on the page provides a helpful contrast. Again, this helps make elements stand out and makes your page easier to view.</p>
<p>But you shouldn’t pair up any old fonts.</p>
<p>For <a target="_blank" href="https://www.canva.com/learn/combining-fonts-10-must-know-tips-from-a-designer/">a bunch of aesthetic reasons</a>, some font pairings look much better than others.</p>
<p>Don’t worry about figuring this out yourself, though. As usual, there are resources on the Internet to help you.</p>
<p>Check out <a target="_blank" href="https://www.freecodecamp.org/news/how-to-make-your-front-end-projects/fontpair.co">fontpair.co</a>. It lets you browse different font pairings and see how they look together.</p>
<p>Once you find a pairing you like, the quickest way to use them in your project is to head over to <a target="_blank" href="https://fonts.google.com/">Google Fonts</a>.</p>
<ul>
<li>Search for the fonts you want</li>
<li>Add them to your project</li>
<li>Include the link in your HTML <code>&lt;head&gt;</code> element</li>
<li>Reference the fonts in the stylesheet</li>
</ul>
<p>See below for an example built on top of the basic page you saw earlier.</p>
<div class="embed-wrapper">
        <iframe width="100%" height="350" src="https://codepen.io/pg2020/embed/ZEGaraM" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="CodePen embed" scrolling="no" allowtransparency="true" allowfullscreen="true" loading="lazy"></iframe></div>
<p>You can also improve the appearance by controlling the font size and text alignment.</p>
<p>Doesn’t that look considerably better? And after only two easy steps.</p>
<h3 id="heading-get-a-colour-scheme">Get a colour scheme</h3>
<p>I’m no designer, but I appreciate the value of learning <a target="_blank" href="https://lifehacker.com/learn-the-basics-of-color-theory-to-know-what-looks-goo-1608972072">the basics of colour theory</a>.</p>
<p>In short, the colours you use on your page go a long way to creating an impression.</p>
<p>For example:</p>
<ul>
<li>Bright, exuberant colours create an energetic feel</li>
<li>Light, toned down shades create a more corporate impression</li>
<li>Dark, contrasting colours create a more dramatic impression</li>
<li>Brand colours create a consistent identity</li>
</ul>
<p>Again, it pays to choose your colours carefully.</p>
<p>The theory goes that the relationship between the colours you use also impacts the appearance of your site.</p>
<ul>
<li>Analogous colours can create a consistent, harmonious appearance</li>
<li>Complementary colours create a pleasing contrast</li>
<li>Triadic colours provide both contrast and balance</li>
</ul>
<p>It pays to pick a colour scheme carefully.</p>
<p>Luckily, there are many ways to do this. Just Google "colour scheme generator" and you will be spoiled for choice.</p>
<p>One of my favourite tools is <a target="_blank" href="http://colormind.io/template/paper-dashboard/">colormind.io</a>. It generates a colour scheme and lets you preview it on a template.</p>
<p>Of course, rules can be broken. Using a more discordant colour scheme can be jarring, but used carefully can give a page an edgier, more stand-out appearance.</p>
<p>See the code below has been updated to use a simple colour scheme.</p>
<div class="embed-wrapper">
        <iframe width="100%" height="350" src="https://codepen.io/pg2020/embed/MWwOQXq" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="CodePen embed" scrolling="no" allowtransparency="true" allowfullscreen="true" loading="lazy"></iframe></div>
<h3 id="heading-add-some-structure">Add some structure</h3>
<p>No matter how well-presented your page is right now, it can be improved by shaking things up a bit.</p>
<p>Adding in sections and structure can break up the monotony of a longer page.</p>
<p>By creating clear bounds between elements, you can create a logical structure and/or hierarchy. This will make it easier for the viewer to understand your page layout.</p>
<p>Keep to the same colour scheme, but vary things up a little.</p>
<p>See the example below has been extended to include more of a structure. The content is divided into <code>&lt;header&gt;</code>, <code>&lt;footer&gt;</code> and <code>&lt;div class="content"&gt;</code> elements.</p>
<p>The example also uses a media query to make the page present better on smaller devices.</p>
<div class="embed-wrapper">
        <iframe width="100%" height="350" src="https://codepen.io/pg2020/embed/zYGPRVg" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="CodePen embed" scrolling="no" allowtransparency="true" allowfullscreen="true" loading="lazy"></iframe></div>
<p>If you want to learn more, try looking into:</p>
<ul>
<li><a target="_blank" href="https://css-tricks.com/snippets/css/complete-guide-grid/">CSS Grid</a> for creating a layout</li>
<li><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox">Flexbox</a> for creating layouts</li>
<li><a target="_blank" href="https://getbootstrap.com/docs/3.4/css/">Bootstrap</a> for creating responsive designs</li>
<li>Responsive design with <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Media_queries">media queries</a></li>
</ul>
<p>It didn’t take much rewriting, but the effect is very noticeable.</p>
<h3 id="heading-add-some-images-and-icons">Add some images and icons</h3>
<p>Humans are typically visual creatures. A well placed image or icon can go a long way to making a page easier to view and understand.</p>
<p>The code below adds a simple image to the main content. See how it is included in the <code>&lt;div class="content"&gt;</code> element and the width is set to 100%? This keeps the structure of the page consistent.</p>
<p>Remember, images should be considered in the context of the overall colour scheme.</p>
<p>You don’t need to be a budding CSS artist or Photoshop wizard to do this. If you need access to high quality photos quickly, your can search <a target="_blank" href="https://unsplash.com/">Unsplash</a> for free-to-use images.</p>
<p>Even a few free icons can make a difference.</p>
<p>The example below adds a simple menu icon to the top right corner. You could also add icons to your Github profile, or other online profiles.</p>
<div class="embed-wrapper">
        <iframe width="100%" height="350" src="https://codepen.io/pg2020/embed/zYGPWrY" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="CodePen embed" scrolling="no" allowtransparency="true" allowfullscreen="true" loading="lazy"></iframe></div>
<p>You can quickly add free icons from these resources:</p>
<ul>
<li><a target="_blank" href="https://fontawesome.com/">Fontawesome</a></li>
<li><a target="_blank" href="https://icons.getbootstrap.com/">Bootstrap</a></li>
<li><a target="_blank" href="https://material.io/resources/icons/?style=baseline">Google</a></li>
<li><a target="_blank" href="https://www.keycdn.com/blog/icon-library">Plenty of others</a></li>
</ul>
<h3 id="heading-add-some-animations">Add some animations</h3>
<p>This final tip is a nice-to-have for sure.</p>
<p>As anyone who used PowerPoint during the 2000s will know, animations need to be used carefully.</p>
<p>Too many animations can be confusing and irritating for users.</p>
<p>But used properly, they can make a page much more interactive and visually appealing.</p>
<p>There are lots of ways to add animations to your site. You can use <a target="_blank" href="https://www.w3schools.com/cssref/sel_hover.asp">CSS selectors</a> to change style in response to certain events, such as when the user hovers on that element.</p>
<p>The example below changes the image opacity to 50% when the user hovers over it.</p>
<p>Another option is to use is <a target="_blank" href="https://daneden.github.io/animate.css/">Animate.css</a>. This provides a number of pre-built animations that you can use straight out-of-the-box.</p>
<p>The code below adds a subtle animation to the buttons when it is clicked.</p>
<div class="embed-wrapper">
        <iframe width="100%" height="350" src="https://codepen.io/pg2020/embed/xxGPWEZ" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="CodePen embed" scrolling="no" allowtransparency="true" allowfullscreen="true" loading="lazy"></iframe></div>
<p>Remember — with animation, less is usually more!</p>
<h4 id="heading-the-final-result">The final result</h4>
<p>See <a target="_blank" href="https://github.com/pg0408/frontend-demo">this Github repo</a> for overall evolution of the page.</p>
<p>The design still has a long way to go. But just by following some simple guidelines, it looks much better than it did at the start.</p>
<p>Here’s a quick review of each of the tips:</p>
<ol>
<li>Add some negative space</li>
<li>Choose a pair of fonts</li>
<li>Pick a coherent colour scheme</li>
<li>Add some structure</li>
<li>Add a few icons or images</li>
<li>(Optionally) add some animation</li>
</ol>
<p>Leave a response below if you found this quick guide helpful. Do you have any tips or tricks you want to share?</p>
<p>Thanks for reading!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How and why I designed a color variant and accessibility tool ]]>
                </title>
                <description>
                    <![CDATA[ By Stephen McLean As a developer, choosing colors for my designs has always been one of the more difficult tasks. To help I tend to use tools like Coolors, SASS Color Generator, and this color contrast checker. My process used to look something like ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/the-why-and-how-of-designing-a-color-variant-and-accessibility-tool/</link>
                <guid isPermaLink="false">66d461507df3a1f32ee7f8ae</guid>
                
                    <category>
                        <![CDATA[ Accessibility ]]>
                    </category>
                
                    <category>
                        <![CDATA[ colors ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ UI Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ ux design ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 03 Sep 2019 11:00:48 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/09/Splash.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Stephen McLean</p>
<p>As a developer, choosing colors for my designs has always been one of the more difficult tasks. To help I tend to use tools like <a target="_blank" href="https://coolors.co/">Coolors</a>, <a target="_blank" href="http://scg.ar-ch.org/">SASS Color Generator</a>, and <a target="_blank" href="https://webaim.org/resources/contrastchecker/">this color contrast checker</a>.</p>
<p>My process used to look something like this:</p>
<ol>
<li>Generate a palette using Coolors</li>
<li>Pick variants for each color using SASS Color Generator</li>
<li>Pair variants together into background/foreground combinations.</li>
<li>Check that the pairs are accessible using the color contrast checker.</li>
<li>Add my chosen colors to my design tool of choice (Figma).</li>
<li>Tweak colors and repeat from step 2.</li>
</ol>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/09/Original-Process.png" alt="Image" width="600" height="400" loading="lazy">
<em>The old process</em></p>
<h1 id="heading-so-what-was-the-problem">So, what was the problem?</h1>
<p>My old process involved a lot of back and forth between different applications. I couldn’t tweak my colors and see the impact on accessibility in real time. Instead, I had to copy/paste HEX codes from one app into another. Then when I was ready to start development, I had to manually create the variables in SASS/CSS and copy the values over again.</p>
<h1 id="heading-and-the-solution">And the solution?</h1>
<p>Create a tool where I could do (almost) everything in one place. My goal was to move towards a process like this:</p>
<ol>
<li>Generate a palette using Coolors</li>
<li>Pick variants, pair colors, and make tweaks using a single app.</li>
<li>Add the resulting colors to my design tool of choice.</li>
</ol>
<p>I also wanted the app to be able to export my colors to code so I would have a good starting point for development.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/09/New-Process.png" alt="Image" width="600" height="400" loading="lazy">
<em>The new process</em></p>
<h1 id="heading-the-initial-proof-of-concept">The initial proof of concept</h1>
<p>I wanted to get something up and running as quickly as possible so I could start testing it out. To that end, I set about creating a prototype.</p>
<h2 id="heading-use-cases">Use Cases</h2>
<p>The first step in getting a prototype put together was to define the use cases that would drive it.</p>
<ol>
<li><strong>As a user, I want to generate variants for my base colors.</strong></li>
</ol>
<p>I wanted to be able to open up the app, add my base colors, pick the variants, and then re-export them back out to my design tool again. Simple ?.</p>
<p><strong>2. As a user, I want to check if a background/foreground color pair is accessible.</strong></p>
<p>From the entered base colors or their variants, I wanted to be able to check if two colors were accessible when paired together.</p>
<p><strong>3. As a user, I should be able to see the impact that changing a base color has on accessibility.</strong></p>
<p>I wanted to be able to get real-time feedback on the color pairs I had picked each time I made tweaks to my base colors.</p>
<h2 id="heading-a-very-rough-working-version">A (very rough) working version</h2>
<p>With the use cases defined, I then set about designing the prototype. I came up with a color palette, designed a limited set of components, and eventually arrived at a solution that had three “modes” or pages, with the user having to switch between them to accomplish their tasks.</p>
<p>Rather than describing it any further, let’s take a look.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/09/poc.gif" alt="Image" width="600" height="400" loading="lazy">
<em>My first draft in action</em></p>
<p>As you can see from the image above, the prototype achieved everything I wanted based on the initial use cases… Sort of.</p>
<blockquote>
<p><em><a target="_blank" href="https://5d112084bc6f2c00097f59a7--rainbo.netlify.com/">Click here</a> if you would like to try the prototype for yourself, thanks to the magic of Netlify deploy previews.</em></p>
</blockquote>
<h1 id="heading-the-good-and-bad-of-the-original-design">The good and bad of the original design</h1>
<p>I never intended for the first prototype to be anything other than a stepping stone, and you can see for yourself that it was quite rough and flawed.</p>
<p>For the next version, I started by looking at <strong>what I liked</strong> about the prototype.</p>
<h2 id="heading-variant-mode">Variant Mode</h2>
<p>I was quite happy with how the variant generating part of the prototype turned out. It was quite simple to pick a color and get your list of variants. Also, the tabbed approach worked quite well for adding multiple base colors.</p>
<h2 id="heading-being-able-to-see-changes-to-accessibility-after-changing-a-color">Being able to see changes to accessibility after changing a color</h2>
<p>As you can see in the short demo above, there was no need to copy/paste HEX codes between applications. I could now change one of my colors and see how that affected color accessibility really quickly.</p>
<p>Then, I started picking things which <strong>I didn’t like</strong> and needed to be <strong>improved</strong>.</p>
<h2 id="heading-interactions-werent-obvious">Interactions weren’t obvious</h2>
<p>Based on arriving at the home page, it wasn’t immediately obvious how you go about picking variants and checking for accessibility. You could probably figure out that you had to click the tiles eventually, but it was really clunky.</p>
<h2 id="heading-the-modes-were-confusing">The modes were confusing</h2>
<p>In the initial designs, you could only add pairs from the palette view, and you could only add/remove variants from the variants view. It all involved a lot of switching between screens and I found myself getting frustrated by how much work the app was making me do. This leads me to my next point.</p>
<h2 id="heading-too-much-clicking-was-needed">Too much clicking was needed</h2>
<p>You have to click to add a variant. Then you have to click to move to the palette view. Then you have to click multiple times to create a pair. Then you have to click some more to see the pair you just added. As I mentioned above, the whole thing was quite clunky and this was probably the worst part of the prototype and something I knew I needed to change.</p>
<h2 id="heading-not-enough-information-was-visible-on-the-screen-at-once">Not enough information was visible on the screen at once</h2>
<p>The more I used it, the more I started to dislike the “modes” concept I created. I think I was influenced by the original process that inspired the application and I designed the screens in silos rather than designing a unified experience. After using the prototype I decided that I needed to migrate away from the “modes” concept to something that ideally could all be done on a single page.</p>
<h1 id="heading-a-second-attempt">A second attempt</h1>
<p>I took the lessons I had learned from the prototype and set about creating a better version of the app.</p>
<p>In order to <strong>reduce the number of interactions</strong> required, <strong>reduce the ambiguity in the interactions</strong>, and to <strong>increase the amount of information available</strong> to the user at once, I decided to move to a drag and drop based UI where the user would be able to drag tiles around to add to their palette or create accessibility checks.</p>
<p>The drag target would always display and this would avoid the need to switch between screens.</p>
<p>Let’s take a look at what I came up with.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/09/Kapture-2019-07-11-at-19.19.23.gif" alt="Image" width="600" height="400" loading="lazy">
<em>The current version</em></p>
<p>You can access the current version of the application <a target="_blank" href="https://rainbo.xyz/">here</a>.</p>
<h1 id="heading-next-steps">Next steps</h1>
<p>The application is still very much in its infancy and although the second version is much closer to the idea I had in mind, there are still improvements that can be made.</p>
<h2 id="heading-import-from-code">Import from code</h2>
<p>As well as exporting the palette I plan to add the ability to read the initial base colors from code containing variables (SASS, and CSS variables to start with)</p>
<h2 id="heading-export-to-more-formats">Export to more formats</h2>
<p>Currently, you can only export SASS. I plan to add support for CSS Variables, and other formats in the future.</p>
<h2 id="heading-integrate-with-design-tools">Integrate with design tools</h2>
<p>Exporting to code is great, but it would be even better if I could export the palette and then import it as a layer or shared style in a design tool such as Figma or Sketch.</p>
<h2 id="heading-refine-the-ui">Refine the UI</h2>
<p>Let’s face it, it’s not the best <em>looking</em> application in the world. I plan to tweak the UI components to improve the app visually.</p>
<h2 id="heading-feedback-and-bug-reporting">Feedback and bug reporting</h2>
<p>This one speaks for itself. I can only improve the app with input from those who use it. To do that, I plan to add a feedback form in the future.</p>
<h1 id="heading-feedback">Feedback</h1>
<p>Speaking of feedback… I wrote this article for two reasons. The first being to walk you through the process I went through to arrive at the current design in the hopes that you can learn from it.</p>
<p>The second reason is that I wanted to showcase the tool to the development and design community as I believe it can be useful for many people, and also to gather feedback on it in its current state.</p>
<p><em>So, if you have any thoughts on the design, functionality, the process I went through to create the tool, or anything else, I would love to hear it!</em></p>
<h1 id="heading-links">Links</h1>
<p><a target="_blank" href="https://5d112084bc6f2c00097f59a7--rainbo.netlify.com/">Prototype</a></p>
<p><a target="_blank" href="https://rainbo.xyz/">Current version</a></p>
<p><a target="_blank" href="https://rainbo-components.netlify.com/">Component library</a></p>
<hr>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to increase user engagement with your app using Color Theory ]]>
                </title>
                <description>
                    <![CDATA[ By Arnav Varyani “Color is a power that directly influences the soul.“— Wassily Kandinsky Colors are the property possessed by an object of producing different sensations on the eye as a result of the way it reflects or emits light. Colors are ofte... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-increase-user-engagement-with-your-app-using-color-theory-7c6f5c632570/</link>
                <guid isPermaLink="false">66c352d579660e79296c1dcd</guid>
                
                    <category>
                        <![CDATA[ app development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ colors ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                    <category>
                        <![CDATA[ UX ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 11 Mar 2019 22:08:16 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/0*T39K_6kH191ZIVb6" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Arnav Varyani</p>
<blockquote>
<p>“Color is a power that directly influences the soul.“— Wassily Kandinsky</p>
</blockquote>
<p>Colors are the property possessed by an object of producing different sensations on the eye as a result of the way it reflects or emits light.</p>
<p>Colors are often attributed to our subconscious, our past, and our personal preferences. Selecting the right color can be one of the most crucial parts of designing literally anything ranging from a poster to an app. More importantly, color has the ability to evoke a certain kind of emotion in a person which may vary based on factors like culture and gender.</p>
<h3 id="heading-how-can-colors-impact-the-way-you-make-decisions">How can colors impact the way you make decisions?</h3>
<p>We have all been <em>socially conditioned</em> by the world we live in. Everything we see has color which is used as a technique to stimulate a certain kind of emotion in people.</p>
<p><strong>The primary colors</strong> are basically the parent colors of all the colors that exist; they are like the roots of every color.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/qI8NDH4eqyIxpRuR9tddtk1t37s6fxx-Oe0p" alt="Image" width="800" height="600" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@justinlim?utm_source=medium&amp;utm_medium=referral" rel="noopener" target="_blank" title=""&gt;Justin Lim on &lt;a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral" rel="noopener" target="<em>blank" title=")</em></p>
<h4 id="heading-red-energy-power-love">Red — Energy, Power, Love</h4>
<p>Red creates a sense of urgency, thus you’ll notice it being used in posters such as that of clearance sales. Additionally red has the ability to increase your appetite, so it is used quite a lot in the food industry too. It is a very emotionally intense color, so using it as a background color may not be the best idea.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/dhv5UrzIyOevAMLc1DhzI9i8eRsH91WQRzzp" alt="Image" width="800" height="533" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@pgreen1983?utm_source=medium&amp;utm_medium=referral" rel="noopener" target="_blank" title=""&gt;Paul Green on &lt;a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral" rel="noopener" target="<em>blank" title=")</em></p>
<h4 id="heading-yellow-optimism-intellect-joy">Yellow — Optimism, Intellect, Joy</h4>
<p>Yellow is a color associated with the sun, and just like red it is really bright. It would be a better choice to use it in your app logo or your app screenshot design. This color may get too overwhelming so use it less than most.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/BDfF8g8o5Vq7jVXQOZPeP290UAOfW6pb0mPp" alt="Image" width="800" height="533" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@conkarampelas?utm_source=medium&amp;utm_medium=referral" rel="noopener" target="_blank" title=""&gt;Con Karampelas on &lt;a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral" rel="noopener" target="<em>blank" title=")</em></p>
<h4 id="heading-blue-stability-tranquility-trust">Blue — Stability, Tranquility, Trust</h4>
<p>Blue usually indicates coolness and calmness and creates a sense of trust, thus it is popularly used in logos of airlines and hospitals. You will notice a lot of app logos use this color, especially the ones that ask for a lot of your private details.</p>
<p><strong>The secondary colors</strong> are the mixtures of two of the three primary colors. They are <strong>green, purple and orange</strong>.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/GvoeQnKqgIFlidKEC0w2Z09rXFvAAphczRJm" alt="Image" width="800" height="449" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@oneshotespresso?utm_source=medium&amp;utm_medium=referral" rel="noopener" target="_blank" title=""&gt;Hans Vivek on &lt;a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral" rel="noopener" target="<em>blank" title=")</em></p>
<h4 id="heading-green-growth-health-freshness">Green — Growth, Health, Freshness</h4>
<p>Green is the color of the environment and is strongly associated with money. It is usually used to advertise healthy foods and fresh products. You will notice that it is famously used in the health &amp; fitness related apps.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/r-6C-dwKeLXGNwmJez-Bed39f-gxB3t9QbiW" alt="Image" width="800" height="533" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@thoughtcatalog?utm_source=medium&amp;utm_medium=referral" rel="noopener" target="_blank" title=""&gt;Thought Catalog on &lt;a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral" rel="noopener" target="<em>blank" title=")</em></p>
<h4 id="heading-purple-royalty-nobility-wealth">Purple — Royalty, Nobility, Wealth</h4>
<p>Purple has the energy of red and the stability of blue; traditionally it is considered to be a feminine color, so you’ll notice it being used in the makeup, fashion, and luxury industries a lot.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/kBXTdo15MfpsxdwDc5p7gmZKWXelrwX9LG9W" alt="Image" width="800" height="533" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@christianw?utm_source=medium&amp;utm_medium=referral" rel="noopener" target="_blank" title=""&gt;Christian Wiediger on &lt;a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral" rel="noopener" target="<em>blank" title=")</em></p>
<h4 id="heading-orange-enthusiasm-encouragement-happiness">Orange — Enthusiasm, Encouragement, Happiness</h4>
<p>Orange packs the energy of red and the optimism of yellow. It is a less commonly used color but is typically used in citrus-based products. It also has the ability to increase the flow of oxygen in the brain.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/UwU3PZ4a9-e9Lc4Eg94MlAzDUiS4bb8wnMBf" alt="Image" width="800" height="533" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@medhatdawoud?utm_source=medium&amp;utm_medium=referral" rel="noopener" target="_blank" title=""&gt;Medhat Dawoud on &lt;a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral" rel="noopener" target="<em>blank" title=")</em></p>
<h4 id="heading-grey-white-and-black">Grey, white, and black</h4>
<p>These are commonly known as bland colors but still give a very classy look and you will notice them being used often in car brands. Grey is usually considered to be an emotionless color and it levitates on the neutral side. Black is usually associated with power, elegance, mystery while white is associated with safety, purity and faith.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/2MhCFyCOZtzW8541gPyb4zi-J-ElLm5Bospc" alt="Image" width="800" height="700" loading="lazy">
_I[mage credits](https://avalaunchmedia.com/services/infographics/" rel="noopener" target="<em>blank" title=")</em></p>
<p>Now that you know about the basic colors, you are not limited to just these six. Using the color wheel, you can also create many different types of color palettes as long as you maintain colorful harmony throughout your app.</p>
<h3 id="heading-how-to-create-color-palettes-using-the-color-wheel"><strong>How to create color palettes using the ‘Color Wheel’</strong></h3>
<blockquote>
<p>A <strong>color wheel</strong> is an abstract illustrative organisation of color hues around a circle, which shows the relationships between primary colors, secondary colors, tertiary colors etc. (<a target="_blank" href="https://en.wikipedia.org/wiki/Color_wheel">Source</a>)</p>
</blockquote>
<p><img src="https://cdn-media-1.freecodecamp.org/images/EMouEFrrDFBlPHx9J6AKBj7tTi6l4thm5YNV" alt="Image" width="600" height="600" loading="lazy">
_[Image credits](https://oss.adm.ntu.edu.sg/ibrahim001/2015/10/19/color-schemes/" rel="noopener" target="<em>blank" title=")</em></p>
<h4 id="heading-monochromatic-colors">Monochromatic colors</h4>
<p>Monochromatic colors are created by using the same color and combining them with various amounts of white or black to create different tones and shades that stand out from each other.</p>
<p>Pros:</p>
<ul>
<li>Trendy</li>
<li>Useful for modern digital design</li>
</ul>
<p><img src="https://cdn-media-1.freecodecamp.org/images/V0YVSbHVNTfyTvq3DdkjkBfXjVeWVMhROZkn" alt="Image" width="600" height="600" loading="lazy">
_[Image credits](https://oss.adm.ntu.edu.sg/ibrahim001/2015/10/19/color-schemes/" rel="noopener" target="<em>blank" title=")</em></p>
<h4 id="heading-analogous-colors">Analogous colors</h4>
<p>Analogous colors are formed when you combine a color on the color wheel with the color immediately next to it.</p>
<p>Pros:</p>
<ul>
<li>Easy to look at</li>
</ul>
<p><img src="https://cdn-media-1.freecodecamp.org/images/ZKttg6klBCyWstPP8NZv7IvWjzKRWoJtakQZ" alt="Image" width="600" height="600" loading="lazy">
_[Image credits](https://oss.adm.ntu.edu.sg/ibrahim001/2015/10/19/color-schemes/" rel="noopener" target="<em>blank" title=")</em></p>
<h4 id="heading-complementary-colors">Complementary colors</h4>
<p>Complementary colors are the exact opposite of analogous colors. Their main purpose is to grab the attention of the user, although it may not be ideal to use it for the main interface of the app.</p>
<p>Pros:</p>
<ul>
<li>Useful for creating app logos and app screenshot designs.</li>
</ul>
<p><img src="https://cdn-media-1.freecodecamp.org/images/J9YvKaLrZ-R3bRBBpjB8oCjy1azw1BDPrJjb" alt="Image" width="600" height="600" loading="lazy">
_[Image credits](https://oss.adm.ntu.edu.sg/ibrahim001/2015/10/19/color-schemes/" rel="noopener" target="<em>blank" title=")</em></p>
<h4 id="heading-split-complementary-colors">Split-Complementary colors</h4>
<p>This is a combination of both analogous and complementary colors where you take one color and pick two colors that are right alongside the opposite color. They are one of my personal favourites.</p>
<p>Pros:</p>
<ul>
<li>Attention grabbing</li>
<li>Easy to look at</li>
</ul>
<p><img src="https://cdn-media-1.freecodecamp.org/images/VnbA0OWktCR74qnR7u47rZUpoyNfYnVkorEP" alt="Image" width="600" height="600" loading="lazy">
_[Image credits](https://oss.adm.ntu.edu.sg/ibrahim001/2015/10/19/color-schemes/" rel="noopener" target="<em>blank" title=")</em></p>
<h4 id="heading-triadic-colors">Triadic colors</h4>
<p>You can create a triadic color palette by taking one color on the color palette and drawing an equilateral triangle on the color wheel to form a triadic color.</p>
<p>Pros:</p>
<ul>
<li>Attention grabbing</li>
<li>Well balanced</li>
<li>Has a vintage feel to it</li>
</ul>
<p><img src="https://cdn-media-1.freecodecamp.org/images/kkt-tJ7XKZ3nIiHoqsEBCMrJGxjW1ydvixAk" alt="Image" width="600" height="600" loading="lazy">
_[Image credits](https://oss.adm.ntu.edu.sg/ibrahim001/2015/10/19/color-schemes/" rel="noopener" target="<em>blank" title=")</em></p>
<h4 id="heading-tetrad-colors-square-based">Tetrad colors (Square-based)</h4>
<p>A square-based tetrad is used when all four colors are evenly spaced throughout the color wheel.</p>
<p>Pros:</p>
<ul>
<li>Works best when colors need to be balanced.</li>
</ul>
<p><img src="https://cdn-media-1.freecodecamp.org/images/vWqPKb3FNAJONw9vdZpE4Se84MBSceNq6vu0" alt="Image" width="600" height="600" loading="lazy">
_[Image credits](https://oss.adm.ntu.edu.sg/ibrahim001/2015/10/19/color-schemes/" rel="noopener" target="<em>blank" title=")</em></p>
<h4 id="heading-tetrad-colors-rectangle-based">Tetrad colors (Rectangle-based)</h4>
<p>A rectangle-based tetrad uses four colors that are pairs of two complementary colors on a color wheel.</p>
<p>Pros:</p>
<ul>
<li>Useful when only one dominant color is required.</li>
</ul>
<h3 id="heading-factors-to-consider-before-using-a-certain-color">Factors to consider before using a certain color</h3>
<p>As I mentioned before, depending on your target audience, your use of colors should differ as they may not always imply the same thing.</p>
<h4 id="heading-culture"><strong>Culture</strong></h4>
<p>It is one of the vital factors to be considered before using any color; depending on the functionality of what your app does you should select an appropriate <strong>dominant color</strong> for your app.</p>
<p>For example, if you’re designing a dating app with your dominant color being red, it would get significantly more downloads in Asia than it would in Africa. Here’s a list that shows how different colors are perceived by different countries.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/nEL35zAXpNjKvmLzKgCAKuAxSffQ9MqSywya" alt="Image" width="800" height="582" loading="lazy"></p>
<h4 id="heading-gender"><strong>Gender</strong></h4>
<p>It has been scientifically demonstrated that men and women prefer certain colors over others. Women tend to prefer primary colors, and <em>love</em> <strong>blue, purple and green</strong> the most, but <em>hate</em> <strong>orange, brown and grey.</strong> If you want you can check almost any e-commerce app/website whose target audience is women and you’ll find these colors affirmed. Similarly, men <em>love</em> <strong>blue, green and black</strong> and <em>hate</em> <strong>brown, orange and purple</strong>.</p>
<h4 id="heading-color-blindness">Color Blindness</h4>
<p>Color blindness affects 1 in 12 men (8%) and 1 in 200 women around the world. This means that ~300 million people are color blind around the world and a mass you shouldn’t neglect. Majority of the population being men, so keeping the above mentioned statistics in mind you should decide your colours accordingly. At the end of the article, i’ve mentioned a tool you can use to see how a color blind person would see an image depending on the type of color blindness a person has.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/9R-aCBhtr9aRJOCGyS8zmiKKqmPbQ-9GpIa3" alt="Image" width="800" height="800" loading="lazy">
_[Image credits](https://www.boredpanda.com/different-types-color-blindness-photos/?utm_source=google&amp;utm_medium=organic&amp;utm_campaign=organic" rel="noopener" target="<em>blank" title=")</em></p>
<h4 id="heading-shades-of-the-same-color"><strong>Shades of the same color</strong></h4>
<p>This can also have quite an influence depending on the intensity of it. For example, bright red may signify love, but another shade of the color red, like crimson, probably wouldn’t signify the same thing.</p>
<h3 id="heading-a-few-great-tools-for-designing">A few great tools for designing</h3>
<p>Now that we have covered the main aspects of color theory, here is a list that shows some of the websites that I use to create my own color palettes.</p>
<ul>
<li><a target="_blank" href="https://colorhunt.co/">Colorhunt</a>—a free and open platform for color inspiration with thousands of trendy hand-picked color palettes</li>
<li>A few other palettes include <a target="_blank" href="http://coolors.co">Coolors</a>, <a target="_blank" href="https://www.materialpalette.com/">Material Design Palette</a> and <a target="_blank" href="https://flatuicolors.com/">Flat UI Colors 2</a></li>
<li><a target="_blank" href="http://www.colorzilla.com/">ColorZilla</a> — a chrome extension for finding the hex color code from any website.</li>
<li><a target="_blank" href="https://www.toptal.com/designers/colorfilter/">Toptal</a> — a great tool for seeing how a color blind person would see a picture.</li>
<li>If you would like to be inspired by a few websites that use their own unique color palette, you can see them <a target="_blank" href="https://visme.co/blog/website-color-schemes/">here</a>.</li>
</ul>
<h3 id="heading-a-few-final-things-to-keep-in-mind">A few final things to keep in mind</h3>
<ul>
<li><strong>Test various color palettes —</strong> Try using different logos on your app to see which one gets you more downloads. Google Play Store offers you an option to show different logos to people so that you can increase your downloads.</li>
<li><strong>Avoid using too many colors</strong> <strong>—</strong> Colors can be a lot of fun, and we’ve seen that throughout this article. But don’t use them more than required, as it would just annoy your user and they could end up deleting your app from your phone.</li>
<li><strong>Use bright colors for CTA’s</strong> — Bright colors tend to be really attention-seeking so use them in buttons and logos, basically whenever you need the user to perform an action.</li>
<li><strong>Use colors that sell your brand the best</strong> — Although you don’t always have to stick to the rules<strong>,</strong> at the end of the day you are selling a product and your main purpose is to market it to make it successful. So use the colors that suit your product the best keeping all the factors in mind.</li>
</ul>
<p>By using all the techniques and tools that we just spoke about in this article, I hope you land up with a good combination of colors for your own website/app. Good luck!</p>
<p>This is my first article, so I would appreciate if you would leave some feedback!</p>
<h3 id="heading-if-you-found-this-article-helpful-give-me-some-claps">If you found this article helpful, give me some claps ?.</h3>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Comprehensive guide for color usage in web design ]]>
                </title>
                <description>
                    <![CDATA[ By Tina Feijóo There is a lot of material about color to be found online. But none of us has the time to search and read lengthy series of articles to cover the topic. That’s why I wanted to create this comprehensive guide for applying color in web d... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/comprehensive-guide-for-color-usage-in-web-design-e2a9afce09fb/</link>
                <guid isPermaLink="false">66d46149d1ffc3d3eb89de74</guid>
                
                    <category>
                        <![CDATA[ colors ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ UI ]]>
                    </category>
                
                    <category>
                        <![CDATA[ visual design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Design ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 24 Jul 2017 21:13:16 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*Qgqu_4KadlHJdQWJu61Cag.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Tina Feijóo</p>
<p>There is a lot of material about color to be found online. But none of us has the time to search and read lengthy series of articles to cover the topic. That’s why I wanted to create this <strong>comprehensive guide for applying color in web design</strong>. In this post we’ll cover:</p>
<ul>
<li>Color psychology</li>
<li>Color terminology</li>
<li>Color rules</li>
<li>How to build and apply a color palette in web design</li>
<li>Useful tools and resources</li>
</ul>
<h3 id="heading-getting-started">Getting started</h3>
<p>So, you have a web design project on your hands. One of the first steps you’ll probably have to take in order to kickstart the process is <strong>choosing a color palette</strong>. If you’re working for an existing brand, then probably your color scope will be limited, especially if this company has a brand guideline. However, if so far you only have a black and white sketch of a brand, waiting for definitions such as color, then keep reading.</p>
<p>The first thing I recommend doing is performing a small exercise with your client or the project’s stakeholders. The exercise consists in having these stakeholders write a short list of attributes that they believe their new brand should have. If you can be on-site for the exercise (I personally work remotely from Argentina for clients in Europe and the US), then have them write each attribute on a sticky note. Then gather all sticky notes and put them on a whiteboard. Soon, you’ll start noticing patterns. Pick up and reorganize the sticky notes so as to cluster the notes that relate to one another. Then, you can name each cluster. In this case, since this is a small exercise, the name would probably be a single word that comprises all those related attributes. In other words, <strong>a consensual attribute</strong>.</p>
<h3 id="heading-color-psychology">Color psychology</h3>
<p>When you finish with this mini-workshop you should have in your hands a list of consensual attributes. Your aim is to get the brand to evoke these attributes. For that, a very strong tool is <strong>color psychology</strong>. You shouldn’t define a brand’s color just because you (or someone else) likes it. Whichever color you use will surely have an impact on your audience. There is a lot to be said about audiences, enough to cover it in a separate post. For now, let’s just say that your <em>audience matters</em> and that you should design specifically for it.</p>
<p>Back to color psychology. To summarize, color affects people and evokes certain ideas/attributes. The way we relate ideas to colors depends on our culture. Different cultures have different color interpretations (see, I told you the audience matters). There is material to be found on color psychology for many countries/areas of the world. Here is a <a target="_blank" href="http://www.empower-yourself-with-color-psychology.com/cultural-color.html">resource I found.</a></p>
<p>In this post, we’ll cover <strong>western color interpretations</strong>:</p>
<ul>
<li><strong>Red:</strong> Love, danger, anger, war. A darker red could be related to elegance.</li>
<li><strong>Orange:</strong> Energy, vitality, autumn.</li>
<li><strong>Yellow:</strong> Warning, happiness, cowardice, or wealth, in a golden shade.</li>
<li><strong>Pink:</strong> Femininity, romance, sensitivity. Could also convey energy and innovation.</li>
<li><strong>Purple:</strong> Royalty, luxury, creativity, spirituality.</li>
<li><strong>Blue:</strong> Sadness, calm, reliability, trust, corporate.</li>
<li><strong>Green:</strong> Nature, luck, cleanliness (depending on the shade).</li>
<li><strong>Grey:</strong> Conservative, modernity, luxury.</li>
<li><strong>Black:</strong> Elegance, power, strength.</li>
<li><strong>White:</strong> Purity, cleanliness, elegance.</li>
</ul>
<p>It is important to note that the shade of the color will also affect its interpretations. But then again, not only the <em>“shade”.</em></p>
<h3 id="heading-color-terminology">Color terminology</h3>
<p><em>Let’s speak properly</em>. If we are going to work with color, we should know how to speak about it, and because of that, how to manipulate it to fit our design needs. Let’s get acquainted with a couple of terms:</p>
<ul>
<li><strong>Hue:</strong> This is the color.</li>
<li><strong>Saturation/Chroma:</strong> This refers to the purity of a color. A color is most pure when it lacks gray.</li>
<li><strong>Value:</strong> Refers to the lightness or darkness of a color.</li>
</ul>
<p>With these three parameters, we can create many “versions” of a color. To better explain it, let’s look at the <strong>Munsell Sphere</strong>:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/C7Zr7T-K2-ia52jUUjcfkmf5bPO-MNdj-qmw" alt="Image" width="700" height="750" loading="lazy"></p>
<p>The “versions” I was referring to earlier actually have names. Yes, more color terminology to learn!</p>
<ul>
<li><strong>Tone:</strong> When you add gray (desaturate) a color or hue.</li>
<li><strong>Shade:</strong> When you add black (lower the value) of a color or hue.</li>
<li><strong>Tint:</strong> When you add white (increase the value) of a color or hue.</li>
</ul>
<h3 id="heading-creating-a-color-palette">Creating a color palette</h3>
<p>So, a quick recap. Until now you have:</p>
<ol>
<li>Defined a list of attributes for your brand.</li>
<li>Selected a color to reflect these attributes, through the use of color psychology.</li>
<li>Determined a more specific “version” (tone, shade or tint) of your color, through your knowledge of the Munsell Sphere.</li>
</ol>
<p>Great! Now, it’s time to build a color palette for your website. To do that, we’ll take your brand’s new color as the central color to base your palette on. The next step is to choose some colors to accompany your main color, and therefore, create your palette. In order to do it, there are several <strong>color rules</strong> that you can choose from and apply. These rules are built upon the <strong>Chromatic Circle</strong> or <strong>Color Wheel</strong>, a very useful tool to create color combinations.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/0hyfAqCFvwP-HlKGkVugTCwBID6mQJ3qUpSj" alt="Image" width="700" height="651" loading="lazy"></p>
<h4 id="heading-complementary-colors">Complementary colors</h4>
<p>These are colors that are located at opposing sides of the Chromatic Circle.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/QMwXwH7jUX4Y5QlQvTXGepjkBWTZFQgrT52Z" alt="Image" width="700" height="400" loading="lazy"></p>
<h4 id="heading-analogous-colors">Analogous colors</h4>
<p>These are colors that are next to each other on the Chromatic Circle.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/rm7xxDbBwtwxPICpJmP5LfSMWW83YrYtv5IC" alt="Image" width="700" height="400" loading="lazy"></p>
<h4 id="heading-triadic-colors">Triadic colors</h4>
<p>These are colors obtained by overlapping an equilateral triangle to the Chromatic Circle.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/zRpflLNXws82g9JdjMBimlAb2TXXsj0PDyLt" alt="Image" width="700" height="400" loading="lazy"></p>
<h4 id="heading-split-complementary-colors">Split-complementary colors</h4>
<p>This combination is obtained by matching the main color to the two colors adjacent to its complementary.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/F6zEfQIJA0iloHLGfQ86XUm2aKIYmwR4Or87" alt="Image" width="700" height="400" loading="lazy"></p>
<h4 id="heading-square-colors">Square colors</h4>
<p>These are colors obtained by overlapping a square to the Chromatic Circle.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/lazyNfbki3qFW00k-Eh7YKxnwapw3Nc8-ISD" alt="Image" width="700" height="400" loading="lazy"></p>
<h4 id="heading-more-combinations">More combinations</h4>
<p>The same as with the triadic and square color combinations, you can create even larger palettes by using other geometrical figures such as pentagon, or a hexagon.</p>
<h4 id="heading-tip-beware-of-color-vibration">Tip: Beware of color vibration</h4>
<p>When you create a palette, especially a complementary palette, it’s not only necessary to define the <strong>hues.</strong> You also need to take into account the <strong>saturation/chroma</strong> and the <strong>value</strong> of your colors<strong>,</strong> in order to get a harmonious palette. Otherwise, you risk your colors vibrating. Literally.</p>
<p>There are some colors, that when placed next to each other, produce a disturbing effect on our eyes. They seem to vibrate. This happens especially with colors that at opposite in the Chromatic Circle, and that have the same level of saturation.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/i2mMPxaoSOYZqn7oAd9FbnNzVqEkpTTinTYy" alt="Image" width="700" height="400" loading="lazy"></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/q4ODTlByh-tn37HWN7GzhrQlW7ssfouNT6O6" alt="Image" width="700" height="400" loading="lazy"></p>
<h3 id="heading-applying-colors-in-web-design">Applying colors in web design</h3>
<p>Now that we have one central color and some notions about color rules, we can choose a strategy and define our color palette for our website design. Let’s start from the beginning.</p>
<h4 id="heading-how-many-colors">How many colors?</h4>
<p>The truth is you can have as many colors as you like, but you should keep in mind that larger color palettes are harder to implement effectively. It may also affect the ability to have a consistent design system in place. However, it’s your choice. I would personally recommend having a simple color palette, especially if you’re just starting.</p>
<h4 id="heading-which-colors-should-my-palette-include">Which colors should my palette include?</h4>
<p>To start, your palette should include a very light color and a very dark color. The idea is that these two colors have a <strong>great</strong> contrast (I will leave tools to measure contrast at the end of the article). For example, black and white (yes, white counts as a color). Why? Because you will need a color for backgrounds and a color for text. Just that simple. Personally, I prefer choosing neutral colors for this. Neutral colors are versatile and elegant and can compliment any given color palette.</p>
<p>Bottom line, your color palette shouldn’t only include very live and interesting colors. You need base colors too.</p>
<h4 id="heading-the-finished-color-palette">The finished color palette</h4>
<p>Let’s say that in total we’re going to have 5 colors in our palette. We already know that one color should be really light (e.g. white) and another color should be very dark (e.g. black). That leaves us three open spots for some interesting colors. We also know that we have the main color and that the other two colors will relate to this main color through the use of color rules.</p>
<p>Let’s pretend our main color is blue. Here are some possible palettes with blue as the main color.</p>
<p>Complementary palette</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/QLRpCjPm3qpzvgcaBoO1IVLrmjn7PstSJmUa" alt="Image" width="700" height="250" loading="lazy"></p>
<p>Analogous palette</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/Kl5r9A1CH7w0aFLt31oES1lOJevwxyy3PVyP" alt="Image" width="700" height="250" loading="lazy"></p>
<p>Triadic palette</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/AkklW08PtCzOwQQrqXLj4JGAVB01zmHhfh91" alt="Image" width="700" height="250" loading="lazy"></p>
<h4 id="heading-how-should-i-apply-these-colors-to-my-design">How should I apply these colors to my design?</h4>
<p>Of course, there are no set rules, and different designers might obtain very different results using the same colors, fonts and so on. This is only meant as a guide for getting started. In other words, if you have no clue whatsoever on what to do with your new color palette.</p>
<p>Let’s continue with our made up palette. Suppose we chose to use the complementary palette.</p>
<h4 id="heading-how-can-we-apply-it">How can we apply it?</h4>
<ul>
<li><strong>White:</strong> can be used as a base/background color. Of course, you can use other light neutrals (like gray) for some backgrounds, or even a bright color from your palette, but in general, for legibility sake, you should probably have more white real estate in place.</li>
<li><strong>Black:</strong> Can be used for text. Again, you can have quotes or highlighted text in another color.</li>
<li><strong>Light blue:</strong> Pick a color that is very different from the text color but has a good contrast with the main background color. In this case, that color would be the light blue. This color will be perfect for hyperlinks. You want links to be distinguishable from your text, but readable.</li>
<li><strong>Blue:</strong> This is your main color, so it will probably set the tone for your design. You will probably use it for some backgrounds, buttons, graphs and so on.</li>
<li><strong>Orange:</strong> This would be your accent color. You could use it to add a touch of color to your design. Could be used on some buttons, miscellanea, icons, and graphs.</li>
</ul>
<h4 id="heading-ok-but-what-about-consistency">Ok, but what about consistency?</h4>
<p>I like rules. Rules for me are what separate designing with a rationale/objective/justification from designing just what you feel like. So, when I was starting I would look for rules to use color. For example:</p>
<ul>
<li>Should all (primary) buttons have the same color?</li>
<li>Should all clickable elements look the same?</li>
<li>Should all clickable elements have the same color?</li>
</ul>
<p>And so on. The truth is there is no rule (in this case). You could have (primary) buttons of different colors, and you could use the same color for clickable and non-clickable elements. Not all clickable elements need to look like links or buttons. Something that <strong>is</strong> necessary is that you clearly show which elements are clickable and which are not. You can achieve this by defining hover states.</p>
<p>Also, however you decide to design your UI elements, you need to make sure that you will keep the design consistent throughout the platform. To do this, you could create:</p>
<ul>
<li>A <a target="_blank" href="http://foundation.zurb.com/sites/docs/kitchen-sink.html">kitchen sink</a> (if you manage HTML/CSS)</li>
<li>A <a target="_blank" href="https://frontify.com/styleguide">style guide</a></li>
<li>Symbols in your design software (e.g. <a target="_blank" href="https://www.sketchapp.com/learn/documentation/symbols/">Sketch symbols</a>). So whenever you need an element, you don’t create it from scratch, you just use an existing symbol. If you make a change on a symbol, this change will reflect on all instances of the symbol.</li>
</ul>
<h3 id="heading-practical-uses-of-color">Practical uses of color</h3>
<p>Color is not only meant to make your design attractive. It is also used to convey meaning. For example:</p>
<ul>
<li>You can use Red/yellow on <strong>warnings/notices</strong>.</li>
<li>You can implement <strong>color coding</strong> (e.g. all content of X topic will have X color).</li>
<li>You can show <strong>status</strong> (green could mean active, red inactive and so on).</li>
</ul>
<p>This is great and it helps users understand and decode the information you’re showing them. However, you shouldn’t rely <strong>solely</strong> on color. Why? Because you need to consider color-blind users, who represent an 8% of the world’s population. For their sake, always try to include clear labels and/or icons to convey meaning, and use color to <strong>support</strong> this meaning.</p>
<h3 id="heading-more-complex-palettes">More complex palettes</h3>
<p>Like we said before, you can have more complex palettes, with more colors. For example a square palette, or an analogous palette with a higher number of colors. It can work out perfectly, but as always, the decision to use more colors should be based on things like the objective of your website and its target audience. Let’s look at a couple of examples:</p>
<h4 id="heading-slack">Slack</h4>
<p><img src="https://cdn-media-1.freecodecamp.org/images/WuTpGR6yR8bQrJhY8czlEEoXNmEMrrluzGS5" alt="Image" width="700" height="650" loading="lazy"></p>
<p><a target="_blank" href="http://slack.com/">slack.com</a></p>
<h4 id="heading-stripe">Stripe</h4>
<p><img src="https://cdn-media-1.freecodecamp.org/images/x1JBcurKoXujV0hVdixg3LyxYYKnnhSWTcUl" alt="Image" width="700" height="1154" loading="lazy"></p>
<p><a target="_blank" href="http://stripe.com/">stripe.com</a></p>
<h3 id="heading-tools-and-resources">Tools and resources</h3>
<p>You’ve reached the end of this article, congratulations! (and thank you for reading). I hope you found this article helpful. We’ve covered a <strong>lot</strong> of ground, but in a summarized way (yes, it could have been longer).</p>
<p>Please find some tools and resources to work with color in web design below:</p>
<h4 id="heading-choosing-colors">Choosing colors</h4>
<ul>
<li><a target="_blank" href="http://www.flatcolorsui.com/">FlatColorsUI</a></li>
<li><a target="_blank" href="http://colorsupplyyy.com/app/">ColorSupplyyy</a></li>
<li><a target="_blank" href="https://color.adobe.com/create/color-wheel/?base=2&amp;rule=Complementary&amp;selected=0&amp;name=My%20Color%20Theme&amp;mode=rgb&amp;rgbvalues=0,0.4470815840874307,0.5862745098039215,0.09999999999999998,0.7863225655388988,1,0,0.675855772600397,0.8862745098039215,0.5862745098039215,0.2937319402343398,0,0.8862745098039215,0.6426813290508187,0.3980977878734222&amp;swatchOrder=0,1,2,3,4">Adobe Color Wheel</a></li>
<li><a target="_blank" href="https://coolors.co/">Coolors</a></li>
<li><a target="_blank" href="https://colordrop.io/">ColorDrop</a></li>
<li><a target="_blank" href="http://www.0to255.com/">Oto255</a></li>
<li><a target="_blank" href="https://getmdl.io/customize/index.html">Custom CSS builder</a></li>
</ul>
<h4 id="heading-check-contrast">Check contrast</h4>
<ul>
<li><a target="_blank" href="http://contrastchecker.com/">ContrastChecker</a></li>
<li><a target="_blank" href="http://contrast-finder.tanaguru.com/">ContrastFinder</a></li>
<li><a target="_blank" href="https://www.smashingmagazine.com/2014/10/color-contrast-tips-and-tools-for-accessibility/">Color contrast tips and tools for accessibility</a> with this <a target="_blank" href="http://webaim.org/resources/contrastchecker/">contrast checker</a></li>
</ul>
<h4 id="heading-color-blindness">Color-blindness</h4>
<ul>
<li><a target="_blank" href="http://colororacle.org/">ColorOracle</a>: With one click see what people with common color vision impairments will see.</li>
</ul>
<p>You can read more of my blog posts at <a target="_blank" href="http://uxagustina.com/comprehensive-guide-for-color-usage-in-web-design/">uxagustina.com</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
