<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Saloni Kansal</title>
    <description>The latest articles on Forem by Saloni Kansal (@saloship).</description>
    <link>https://forem.com/saloship</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F903447%2F8d6e366e-aacb-451e-b467-51cbe1a1834b.png</url>
      <title>Forem: Saloni Kansal</title>
      <link>https://forem.com/saloship</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/saloship"/>
    <language>en</language>
    <item>
      <title>Base set up for 3-D Web Dev: Three-Fiber, TailwindCSS, Vite-React</title>
      <dc:creator>Saloni Kansal</dc:creator>
      <pubDate>Sun, 07 May 2023 20:25:37 +0000</pubDate>
      <link>https://forem.com/saloship/base-setup-for-3-d-web-dev-30h5</link>
      <guid>https://forem.com/saloship/base-setup-for-3-d-web-dev-30h5</guid>
      <description>&lt;blockquote&gt;
&lt;h2&gt;
  
  
  Table Of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Why this way only?&lt;/li&gt;
&lt;li&gt;Setup Vite-React&lt;/li&gt;
&lt;li&gt;Install and congifure Tailwind&lt;/li&gt;
&lt;li&gt;Install Three-fiber &amp;amp; Three-drei&lt;/li&gt;
&lt;li&gt;Check if its working&lt;/li&gt;
&lt;li&gt;ReadMe content to share&lt;/li&gt;
&lt;li&gt;Docs for further build&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here is the guide for base setup to make your 3D visual website or to follow any tutorial on it.&lt;br&gt;
After following this, the project will have &lt;code&gt;React-three-fiber&lt;/code&gt; ( React renderer for threejs )+ &lt;code&gt;Three-drei&lt;/code&gt;( helper of Three-fiber )+ &lt;code&gt;Tailwindcss&lt;/code&gt; using postcss on &lt;code&gt;Vite-react&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Vite is used instead of direct React because Create React App does not support custom PostCSS configurations and is incompatible with many important &lt;a&gt;&lt;/a&gt;tools in the PostCSS ecosystem, like &lt;code&gt;postcss-import&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why this combination only?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;React three fiber&lt;/strong&gt; makes it possible to develop 3d websites inside of the react ecosystem, you might think that react three fiber has limitations because it's another shell around threejs but, this is not the case all 3d functionalities will work in react three fiber without any exceptions. There is no hard dependency on a specific threejs version so you don't have to worry about breaking code because of a new threejs update.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;React three drei&lt;/strong&gt; is a collection of useful helpers abstractions and react components for react three fiber which makes it a lot easier to add different kinds of objects like cameras, images, 3d models, shapes, and many more.&lt;/p&gt;

&lt;p&gt;And with all this, to do custom styling easily &lt;strong&gt;Tailwind CSS&lt;/strong&gt; framework can be used. &lt;br&gt;
&lt;a&gt;&lt;/a&gt;&lt;br&gt;
let's start the setup,&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Setup Vite React app:
&lt;/h4&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


npm create vite@latest projectName -- --template react
cd projectName


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

&lt;/div&gt;
&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  2. Install Tailwind CSS and Other Dependencies for it:
&lt;/h4&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

npm install -D tailwindcss postcss autoprefixer


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

&lt;/div&gt;
&lt;p&gt;Generate the Configuration Files,&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

npx tailwindcss init -p


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

&lt;/div&gt;
&lt;p&gt;This generates two new files &lt;code&gt;tailwind.congif.js&lt;/code&gt; and &lt;code&gt;postcss.config.js&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Configure Source Paths: open &lt;code&gt;tailwind.config.js&lt;/code&gt; file and make sure the content property looks like this:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

  content: [
    "./index.html",
    "./src/**/*.{js,ts,jsx,tsx}",
  ]


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

&lt;/div&gt;
&lt;p&gt;Add tailwind directives to CSS by adding the statements below to your .&lt;code&gt;/src/index.css&lt;/code&gt; file:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

@tailwind base;
@tailwind components;
@tailwind utilities;


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

&lt;/div&gt;
&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  3. Install three-fiber and three-drei:
&lt;/h4&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

npm install three @react-three/fiber


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

&lt;/div&gt;
&lt;p&gt;Install rect-three/drei&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

npm install @react-three/drei


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

&lt;/div&gt;
&lt;p&gt;The File-System module of the project should look like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg0d2t5w9zey7h6gguv7c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg0d2t5w9zey7h6gguv7c.png" alt="screenshot of the FileSystem module at this point"&gt;&lt;/a&gt;&lt;br&gt;
And the package.json file should have the following dependencies:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fovy3he7t4gzqj284siyh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fovy3he7t4gzqj284siyh.png" alt="screenshot of the dependencies in package.json file"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;confirming that drie, fiber, postcss and tailwind are installed&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;If in terminal there is any vulnerability &lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

npm audit fix


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

&lt;/div&gt;
&lt;h4&gt;
  
  
  4. Final Add-ons then, run the script:
&lt;/h4&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

npm install
npm run dev




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

&lt;/div&gt;
&lt;p&gt;All the dependencies are installed and on the local host, the project should be running:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxmkd35pff4lasvqb00x6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxmkd35pff4lasvqb00x6.png" alt="screenshot of default vite-react website"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Vite's default dev server port is now 5173.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So, to clean the slate and make room for your files and codes the files that can be deleted (now this depends on projects requirements)&lt;br&gt;
but in general:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;public folder can be emptied completely&lt;/li&gt;
&lt;li&gt;src test files can be deleted&lt;/li&gt;
&lt;li&gt;delete svg or png files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rest is depends on the file structure one requires. &lt;/p&gt;



&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;Is everything running though?&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;To test write the following in &lt;code&gt;app.jsx&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

import { useState } from 'react'
import './App.css'
import {Canvas} from "@react-three/fiber";
import {OrbitControls} from "@react-three/drei";

function App() {
  const [count, setCount] = useState(0)

  return (
// tailwind css usage
    &amp;lt;div className={' bg-indigo-800 absolute w-full h-screen p-0 top-0 left-0'}&amp;gt; 
      &amp;lt;div className={'h-5/6 p-0 '}&amp;gt;
        &amp;lt;Canvas camera = {{
          position: [0,0,7],
          fov:30,

        }}&amp;gt;
          &amp;lt;color attach="background" args={["#ececec"]}/&amp;gt;
// three-drei usage
          &amp;lt;OrbitControls/&amp;gt; 
          &amp;lt;mesh rotation ={[Math.PI / 10,10,10]}&amp;gt;
// three-fiber usage
            &amp;lt;torusGeometry /&amp;gt; 
            &amp;lt;meshNormalMaterial/&amp;gt;
          &amp;lt;/mesh&amp;gt;
        &amp;lt;/Canvas&amp;gt;
        &amp;lt;div className={"text-current text-7xl italic font-light z-40 p-5"}&amp;gt;yaee! you made it &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  )
}

export default App



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

&lt;/div&gt;
&lt;p&gt;save it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;After this a screen with a donut floating will appear on the site&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkjhyoy05ygeke7v4pgy9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkjhyoy05ygeke7v4pgy9.png" alt="Screenshot of the running webdite having a torus floating in middle of screen"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="https://base-setup3d-web.vercel.app/" rel="noopener noreferrer"&gt;
      base-setup3d-web.vercel.app
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;a&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
Now for anyone who wants to run this project of yours can follow the following steps:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

npm install
npm run dev


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

&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;This is something you will write in your ReadMe file.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;br&gt;
Here are some documentations on the technologies used to help in further development.&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://tailwindcss.com/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftailwindcss.com%2F_next%2Fstatic%2Fmedia%2Fsocial-card-large.a6e71726.jpg" height="auto" class="m-0"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://tailwindcss.com/" rel="noopener noreferrer" class="c-link"&gt;
          Tailwind CSS - Rapidly build modern websites without ever leaving your HTML.
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Tailwind CSS is a utility-first CSS framework for rapidly building modern websites without ever leaving your HTML.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftailwindcss.com%2Ffavicons%2Ffavicon-32x32.png%3Fv%3D3"&gt;
        tailwindcss.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://r3f.docs.pmnd.rs/getting-started/your-first-scene" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fpmndrs%2Freact-three-fiber%2Fraw%2Fmaster%2Fdocs%2Flogo.jpg" height="auto" class="m-0"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://r3f.docs.pmnd.rs/getting-started/your-first-scene" rel="noopener noreferrer" class="c-link"&gt;
          Your first scene - React Three Fiber
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          This guide will help you setup your first React Three Fiber scene and introduce you to its core concepts.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/data%3Aimage%2Fsvg%2Bxml%2C%250A%2520%2520%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520version%253D%25221.1%2522%2520xmlns%253Axlink%253D%2522http%253A%252F%252Fwww.w3.org%252F1999%252Fxlink%2522%2520xmlns%253Asvgjs%253D%2522http%253A%252F%252Fsvgjs.com%252Fsvgjs%2522%2520width%253D%2522100%2522%2520height%253D%2522100%2522%253E%250A%2520%2520%2520%2520%250A%2520%2520%2520%2520%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%2520100%2520100%2522%253E%250A%2520%2520%2520%2520%2520%2520%253Ctext%2520x%253D%252250%2522%2520y%253D%252250%2522%2520font-size%253D%2522100%2522%2520dominant-baseline%253D%2522central%2522%2520baseline-shift%253D%2522-0%2525%2522%2520text-anchor%253D%2522middle%2522%253E%25F0%259F%2587%25A8%25F0%259F%2587%25AD%253C%252Ftext%253E%250A%2520%2520%2520%2520%253C%252Fsvg%253E%250A%2520%2520%2520%2520%250A%2520%2520%2520%2520%253Cstyle%253E%250A%2520%2520%2520%2520%253Aroot%2520%257B%250A%2520%2520%2520%2520%2520%2520--bg%253A%2520%2523f10055%253B%250A%2520%2520%2520%2520%2520%2520--txt%253A%2520white%253B%250A%2520%2520%2520%2520%257D%250A%2520%2520%2520%2520.badge%2520%257Bfill%253A%2520var%28--bg%29%253B%257D%250A%2520%2520%2520%2520.shape%2520%257Bfill%253A%2520var%28--txt%29%253B%257D%250A%2520%2520%2520%2520%253C%252Fstyle%253E%250A%2520%2520%253C%252Fsvg%253E%250A%2520%2520"&gt;
        r3f.docs.pmnd.rs
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/pmndrs" rel="noopener noreferrer"&gt;
        pmndrs
      &lt;/a&gt; / &lt;a href="https://github.com/pmndrs/drei" rel="noopener noreferrer"&gt;
        drei
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      🥉 useful helpers for react-three-fiber
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;&lt;a href="https://codesandbox.io/s/bfplr" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fpmndrs%2Fdreidocs%2Flogo.jpg" alt="logo"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.npmjs.com/package/@react-three/drei" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/75712e1ac01646399c07d396fa2311e26fa0021b1093a3595e107cb226f50ccd/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f4072656163742d74687265652f647265693f7374796c653d666c617426636f6c6f72413d30303030303026636f6c6f72423d303030303030" alt="Version"&gt;&lt;/a&gt;
&lt;a href="https://www.npmjs.com/package/@react-three/drei" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/7262d5b6ef3186ac0aab1c1d50824648104a47c5d182fe2bfdb9ce802f4b9a58/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f64742f4072656163742d74687265652f647265692e7376673f7374796c653d666c617426636f6c6f72413d30303030303026636f6c6f72423d303030303030" alt="Downloads"&gt;&lt;/a&gt;
&lt;a href="https://discord.com/channels/740090768164651008/741751532592038022" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/cde306f60b60920beb3e31e74d5530cf106a718ca98aac75db043b8c1accfeef/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f3734303039303736383136343635313030383f7374796c653d666c617426636f6c6f72413d30303030303026636f6c6f72423d303030303030266c6162656c3d646973636f7264266c6f676f3d646973636f7264266c6f676f436f6c6f723d666666666666" alt="Discord Shield"&gt;&lt;/a&gt;
&lt;a href="https://github.com/codespaces/new?template_repository=pmndrs%2Fdrei" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/b3071b9a18ce4cbd0872ca26d9e81a7314f7b178eed2b6b7a8bee1b87583c2e4/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f266d6573736167653d4f70656e253230696e253230253230436f6465737061636573267374796c653d666c617426636f6c6f72413d30303030303026636f6c6f72423d303030303030266c6162656c3d476974487562266c6f676f3d676974687562266c6f676f436f6c6f723d666666666666" alt="Open in GitHub Codespaces"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A growing collection of useful helpers and fully functional, ready-made abstractions for &lt;a href="https://github.com/pmndrs/react-three-fiber" rel="noopener noreferrer"&gt;@react-three/fiber&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you make a component that is generic enough to be useful to others, think about &lt;a href="https://github.com/pmndrs/dreiCONTRIBUTING.md" rel="noopener noreferrer"&gt;CONTRIBUTING&lt;/a&gt;!&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;npm install @react-three/drei&lt;/pre&gt;

&lt;/div&gt;
&lt;div class="markdown-alert markdown-alert-important"&gt;
&lt;p class="markdown-alert-title"&gt;Important&lt;/p&gt;
&lt;p&gt;this package is using the stand-alone &lt;a href="https://github.com/pmndrs/three-stdlib" rel="noopener noreferrer"&gt;&lt;code&gt;three-stdlib&lt;/code&gt;&lt;/a&gt; instead of &lt;a href="https://github.com/mrdoob/three.js/tree/master/examples/jsm" rel="noopener noreferrer"&gt;&lt;code&gt;three/examples/jsm&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Basic usage&lt;/h2&gt;
&lt;/div&gt;

&lt;div class="highlight highlight-source-js notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-k"&gt;import&lt;/span&gt; &lt;span class="pl-kos"&gt;{&lt;/span&gt; &lt;span class="pl-v"&gt;PerspectiveCamera&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-v"&gt;PositionalAudio&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; ... &lt;span class="pl-kos"&gt;}&lt;/span&gt; &lt;span class="pl-k"&gt;from&lt;/span&gt; &lt;span class="pl-s"&gt;'@react-three/drei'&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;React-native&lt;/h2&gt;
&lt;/div&gt;

&lt;div class="highlight highlight-source-js notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-k"&gt;import&lt;/span&gt; &lt;span class="pl-kos"&gt;{&lt;/span&gt; &lt;span class="pl-v"&gt;PerspectiveCamera&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-v"&gt;PositionalAudio&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; ... &lt;span class="pl-kos"&gt;}&lt;/span&gt; &lt;span class="pl-k"&gt;from&lt;/span&gt; &lt;span class="pl-s"&gt;'@react-three/drei/native'&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;native&lt;/code&gt; route of the library &lt;strong&gt;does not&lt;/strong&gt; export &lt;code&gt;Html&lt;/code&gt; or &lt;code&gt;Loader&lt;/code&gt;. The default export of the library is &lt;code&gt;web&lt;/code&gt; which &lt;strong&gt;does&lt;/strong&gt; export &lt;code&gt;Html&lt;/code&gt; and &lt;code&gt;Loader&lt;/code&gt;.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Documentation&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://pmndrs.github.io/drei" rel="nofollow noopener noreferrer"&gt;https://pmndrs.github.io/drei&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-alert markdown-alert-warning"&gt;
&lt;p class="markdown-alert-title"&gt;Warning&lt;/p&gt;
&lt;p&gt;Below is an archive of the anchors links with their new respective locations to the documentation website.
Do not update the links below, they are for reference only.&lt;/p&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Cameras&lt;/h3&gt;

&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h4 class="heading-element"&gt;PerspectiveCamera&lt;/h4&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://pmndrs.github.io/drei/cameras/perspective-camera" rel="nofollow noopener noreferrer"&gt;Documentation has moved here&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h4 class="heading-element"&gt;OrthographicCamera&lt;/h4&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://pmndrs.github.io/drei/cameras/orthographic-camera" rel="nofollow noopener noreferrer"&gt;Documentation has moved here&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h4 class="heading-element"&gt;CubeCamera&lt;/h4&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://pmndrs.github.io/drei/cameras/cube-camera" rel="nofollow noopener noreferrer"&gt;Documentation has moved here&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Controls&lt;/h3&gt;

&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h4 class="heading-element"&gt;CameraControls&lt;/h4&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://pmndrs.github.io/drei/controls/camera-controls" rel="nofollow noopener noreferrer"&gt;Documentation has moved&lt;/a&gt;…&lt;/p&gt;
&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/pmndrs/drei" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;em&gt;Hope it helped!&lt;/em&gt;

</description>
      <category>vite</category>
      <category>tutorial</category>
      <category>threefiber</category>
      <category>tailwindcss</category>
    </item>
    <item>
      <title>Accessible Design</title>
      <dc:creator>Saloni Kansal</dc:creator>
      <pubDate>Tue, 09 Aug 2022 08:52:00 +0000</pubDate>
      <link>https://forem.com/saloship/accessible-design-and-color-color-blind-l1n</link>
      <guid>https://forem.com/saloship/accessible-design-and-color-color-blind-l1n</guid>
      <description>&lt;p&gt;With the growing demand for accessible designs, comes the challenges choose the right colours.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  Index
&lt;/h4&gt;

&lt;p&gt;How do we see color?&lt;br&gt;
Guide to perfecting the design&lt;br&gt;
It's more than color to help&lt;br&gt;
Tools&lt;br&gt;
Suggestions&lt;br&gt;
Conclusion&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;strong&gt;Color blindness (color vision deficiency) is the decreased ability to see color or differences in color.&lt;/strong&gt;&lt;br&gt;
Males are more likely to be color blind than females, because the genes responsible for the most common forms of color blindness are on the X chromosome.&lt;br&gt;
&lt;a&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;How do some of us see colors differently ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Color is the way our eyes and brains perceive light. As the light enters our eyes it hits our retina where the light-sensitive cells, rods and cones are present.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://daisymolving.github.io/assets/rods_and_cones.jpg"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KHn-TPIc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7v09e2sly8yjuxq01eig.png" alt="Image description" width="800" height="413"&gt;&lt;br&gt;
&lt;/a&gt;&lt;br&gt;
&lt;em&gt;image source:&lt;a href="http://daisymolving.github.io/assets/rods_and_cones.jpg"&gt;daisymolving&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cone cells&lt;/strong&gt; are used in color vision and require a brightly lit environment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rods&lt;/strong&gt;, which detect dim light and are used for night vision so cones are responsible for the colors we see&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cones are of 3 types L, M, and S cones. Each type of cone reacts a different amount to different wavelengths. here is the graph of how each of them reacts differently.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AAeYtueK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qo2kn6v5iux6juegyebk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AAeYtueK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qo2kn6v5iux6juegyebk.png" alt="Graph of different cones reacting to different color of light" width="722" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If yellow lights enter the eye then L will react a lot, M reacts a little, and S doesn't react, all of these signals to the brain that its yellow.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Now depending on which type of cone cells and by how much someone is missing results in different types of color blindness&lt;/strong&gt;, a reduced ability to distinguish between certain colors.&lt;/p&gt;




&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Red-green color blindness
&lt;/h4&gt;

&lt;p&gt;Red–green color blindness affects up to 1 in 12 males (8%) and 1 in 200 females (0.5%)&lt;/p&gt;

&lt;p&gt;There are 4 types based on red and green color.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deuteranomaly is the most common amongst them, making green look more red. This type is mild and doesn't usually get in the way of normal activities.&lt;/li&gt;
&lt;li&gt;Protanomaly makes red look more green and less bright. This type is also mild.&lt;/li&gt;
&lt;li&gt;Protanopia and deuteranopia both make you unable to tell the difference between red and green at all. basically more severe cases of the above two.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JLabU4zb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/43mtg56ueowx4l5gri1i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JLabU4zb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/43mtg56ueowx4l5gri1i.png" alt="color wheels in red-green color blindness" width="800" height="370"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;-Outer ring represents the colors to normal eye and inner circle has same colors but it shows how colorblind see it-&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Blue-yellow color blindness
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Tritanomaly makes it hard to tell the difference between blue and green, and between yellow and red.&lt;/li&gt;
&lt;li&gt;Tritanopia makes you unable to tell the difference between blue and green, purple and red, and yellow and pink. It also makes colors look less bright.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2pWqJ1zC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eudpkfl9bw2xu4sxjrmv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2pWqJ1zC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eudpkfl9bw2xu4sxjrmv.png" alt="color wheel in blind-yellow color blindness" width="800" height="370"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;-Outer ring represents the colors to normal eye and inner circle has same colors but it shows how colorblind see it-&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Complete color blindness
&lt;/h4&gt;

&lt;p&gt;If you have complete color blindness, you can't see colors at all. This is also called monochromacy, and it's quite uncommon. so things are grayscaled for them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pIWhZZLP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fc6z3f8bzi50vx3lmfbn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pIWhZZLP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fc6z3f8bzi50vx3lmfbn.png" alt="color wheel in complete color blindness" width="800" height="370"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;-Outer ring represents the colors to normal eye and inner circle has same colors but it shows how colorblind see it-&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So how can designs be more inclusive?&lt;/strong&gt;&lt;br&gt;
Choose colors that everyone can distinguish if not then have some way that they can still get the information clearly.&lt;/p&gt;




&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  To do this here is the guide:
&lt;/h2&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;Base concept:&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;The first thing that needs to be taken care of is contrast, if contrast is maintained properly, anyone can read the text easily. &lt;strong&gt;WCAG&lt;/strong&gt; Web Content Accessibility Guidelines are part of a series of web accessibility guidelines published by the Web Accessibility Initiative (WAI) of the World Wide Web Consortium (W3C), the main international standards organization for the Internet. They are a set of recommendations for making Web content more accessible, primarily for people with disabilities.It has defined the minimum contrast ratio for graphic and user interface components it has three levels depending on the user type. &lt;a href=""&gt;here&lt;/a&gt; you can check the contrast and have a look at brief info they have on actual numbers to help you choose your WCAG level. for details you can see &lt;a href="https://webaim.org/standards/wcag/checklist/#g1.4"&gt;guidlines&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;WCAG guidelines is a good practice for clear designs that every designer should follow&lt;/p&gt;

&lt;h3&gt;
  
  
  Monochromatic
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.vectornator.io/blog/monochromatic-colors/#:~:text=%22Monochrome%20means%20one%20color%2C%20so,Mono%3D%20%E2%80%9Cone%E2%80%9D"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BpcHz_H2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eumaj5kqq1wixr9ir9gp.png" alt="Image description" width="800" height="819"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  &lt;em&gt;image source:&lt;a href="https://www.vectornator.io/blog/monochromatic-colors/#:~:text=%22Monochrome%20means%20one%20color%2C%20so,Mono%3D%20%E2%80%9Cone%E2%80%9D"&gt;Ben Barnhart&lt;/a&gt;&lt;/em&gt;
&lt;/h6&gt;

&lt;p&gt;Stick to one color and experiment with its shades like how dark or light the color is, ranging from black to white, and play with saturation a bit. the best thing about a monochromatic color scheme is that colors are guaranteed to look cohesive. to generate monochromatic palettes easiest way is to work with &lt;a href="https://programmingdesignsystems.com/color/color-models-and-color-spaces/index.html"&gt;HSV/HSB/HSI&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://commons.wikimedia.org/wiki/File:HSV_color_solid_cylinder.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--w7wveH3b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vuehtk62be1l811l0l27.png" alt="Image description" width="259" height="194"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  &lt;em&gt;image:&lt;a href="https://commons.wikimedia.org/wiki/File:HSV_color_solid_cylinder.png"&gt;from Wikimedia Commons&lt;/a&gt;&lt;/em&gt;
&lt;/h6&gt;

&lt;p&gt;In HSV models,&lt;br&gt;
Hue is the easiest one; it's basically just another word for "color."&lt;br&gt;
Saturation refers to intensity—in other words, whether the color appears more subtle or more vibrant.&lt;br&gt;
Value has to do with how dark or light the color is, ranging from black.&lt;br&gt;
So just keep the hue same and play around with saturation and value to get the mono palette&lt;br&gt;
OR&lt;br&gt;
Just select a color and this &lt;a href="https://pinetools.com/monochromatic-colors-generator"&gt;monochromatic colors generator&lt;/a&gt; will generate the palette for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Color combination but with different shades
&lt;/h3&gt;

&lt;p&gt;If you have planned to use more than one hue then there is one thing to keep in mind, not only use different colors but also keep the shades of those colors different from each other as well.&lt;/p&gt;

&lt;p&gt;Light red cannot be used with light green as red and green appear the same to some people, but you can use dark red with light green , the intensity of the color is different so they will appear different.&lt;/p&gt;

&lt;h3&gt;
  
  
  Avoid these color combination
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Green &amp;amp; blue&lt;/li&gt;
&lt;li&gt;Blue &amp;amp; gray&lt;/li&gt;
&lt;li&gt;Blue &amp;amp; Purple&lt;/li&gt;
&lt;li&gt;Pink, turquoise, and grey&lt;/li&gt;
&lt;li&gt;Red, green, and brown
&lt;em&gt;see how they appear in color blind vision&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--M-gr8nD7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xwv1ung9b98y8v4zrvvl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--M-gr8nD7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xwv1ung9b98y8v4zrvvl.png" alt="colors in different visions" width="770" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Use patterns and texture
&lt;/h3&gt;

&lt;p&gt;If you can't change colors then use patterns to make a way to distinguish them or a color coding system. in a &lt;a href="https://bit.ly/3A1kFMq"&gt;color coding system&lt;/a&gt;, you assign shapes to colors.This could be done in bar graphs or in maps.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7rKHz7Tq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/td8jj3t0r7zlqq5uc4ra.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7rKHz7Tq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/td8jj3t0r7zlqq5uc4ra.png" alt="example of color coding system" width="472" height="129"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;Example: that metro maps we see are not color-blind freindly&lt;br&gt;
 solution: for different routes different type of lines could be used like dashed,dotted,chain,zig-zag,double lines etc.. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Texture adds a new dimension to the design, like for water in dackdrop with blue color add wave texture too.&lt;br&gt;
&lt;a href="https://www.behance.net/gallery/3411991/Pattern-Matters-Tangible-Paper-Infographic"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MrlazT4r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w2zn28kud5ezsjwq8nbo.png" alt="Image description" width="600" height="900"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  &lt;em&gt;image:&lt;a href="https://www.behance.net/gallery/3411991/Pattern-Matters-Tangible-Paper-Infographic"&gt;Siang Ching&lt;/a&gt;&lt;/em&gt;
&lt;/h6&gt;

&lt;p&gt;If the color is supposed to evoke a certain vibe or emotion then use texture does that for you very well. Textures don't need to have a lot of contrast with background color.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://steakmob.tumblr.com/post/18754283326"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CfEvVytR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vx658ynk537qy555vzcp.png" alt="Image description" width="500" height="665"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  &lt;em&gt;image:&lt;a href="https://steakmob.tumblr.com/post/18754283326"&gt;steakmob&lt;/a&gt;&lt;/em&gt;
&lt;/h6&gt;

&lt;h3&gt;
  
  
  Use symbols
&lt;/h3&gt;

&lt;p&gt;For every event/function you are planning in your design make sure that change in color is not the only indication of that event being active or inactive.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In Spotify for the repeated button on being active not only the color changes but also a small dot appears at the bottom of it. use symbols to convey the emotion, for danger with red color use the symbol of it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KmJVRSAJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qrv1fmlfo80l7w55z3dg.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KmJVRSAJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qrv1fmlfo80l7w55z3dg.jpg" alt="Snip of Spotify repeat active" width="800" height="307"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Tips:
&lt;/h4&gt;

&lt;h3&gt;
  
  
  Use HSV/ HSL /HSI color model
&lt;/h3&gt;

&lt;p&gt;It is better to use one of these models as at any point slight changes in the saturation, tint, brightness, lightness can be done easily. while being in RGB it is much more difficult to change shades while sticking to the main color(hue).&lt;a href="https://programmingdesignsystems.com/color/color-models-and-color-spaces/index.html"&gt;Here&lt;/a&gt; Check out the blog post on Color models and color space for better understanding of how these model are different from each other and how they work.&lt;/p&gt;

&lt;h3&gt;
  
  
  Check every functionality of the design in grayscale mode
&lt;/h3&gt;

&lt;p&gt;there are extensions for that in browsers and for offline work, every windows/mac/Linux has themes for color blindness in settings type grayscale or go to color filters in settings.&lt;/p&gt;

&lt;h3&gt;
  
  
  Avoid giving info only when you hover or it
&lt;/h3&gt;

&lt;p&gt;I'll explain this with 2 examples&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In amazon, you get to see the name of color only when you hover over it, now it's a bit irritating to hover over every color to find what you are looking for. 
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rgYfmtXM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3q7k7yhkf85zrjlzgcys.png" alt="Snip on Amazon color filter" width="301" height="111"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;solution:  use dropdown menu which has the colors with their names and when user hover over the colour it show colour names to indicate it to the user that for the name use the dropdown menu, if the question is the space constraint then someone will only look in the dropdown menu only when they need it&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Q7H8zxOa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bes6v9z29nw72yj4x9gv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Q7H8zxOa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bes6v9z29nw72yj4x9gv.png" alt="HSV color model" width="354" height="210"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Links between texts and the linked images again keep hovering on every word till the cursor changes. solution: underline the linked text and add a linked symbol for linked images&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  For backgrounds
&lt;/h3&gt;

&lt;p&gt;Reduce the opacity of the image to increase the contrast making the text easier to read. Or use shadows on texts to enhance it a bit.&lt;/p&gt;




&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Tools that will help in the process:
&lt;/h3&gt;

&lt;p&gt;Tools I found to work best all together:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.whocanuse.com/"&gt;who can use&lt;/a&gt; (preffered)&lt;br&gt;
This tools does all tells you contrast ratio, if it passes WCAG Grading in general and also individualy for all types of color-blindness. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.colorbox.io/"&gt;Colorbox&lt;/a&gt;&lt;br&gt;
Takes time to get the hang of it but Worth checking it out, Generate color palettes in HSV and color curves with the contrast level mentioned and a preview of the text. you can work on more than one palette at a time. You can get all sorts of combinations between the bound colors you choose.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.color-blindness.com/coblis-color-blindness-simulator/"&gt;Coblis&lt;/a&gt;&lt;br&gt;
Shows your images will appear to people with color blindness, good to check your background images.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For local/offline works you can change the theme of your windows/mac/Linux in the settings to any vision&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For testing your website for color-blindness in browser&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you right-click anywhere in the webpage and then select Inspect. Or, press F12. DevTools opens next to the webpage&lt;/li&gt;
&lt;li&gt;.Press Esc to open the Drawer at the bottom of DevTools. Click the + icon at the top of the Drawer to see the list of tools, and then select Rendering.In the Emulate vision deficiencies dropdown list, select the   vision you want to emulate&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aJInhH_l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/22yh2t0gslsvwowxgv2n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aJInhH_l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/22yh2t0gslsvwowxgv2n.png" alt="SS of dev tools" width="800" height="501"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Other valuable tools that can come in handy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://khroma.co/"&gt;Khroma&lt;/a&gt;&lt;br&gt;
Not the ideal but still,&lt;br&gt;
With Khroma, you get to train an AI algorithm by choosing 50 colors that you like. Make sure in setting to toggle WCAG color on to block the failing colors note: color palettes are not color blind friendly. they depend on the colors you selected&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://color.adobe.com/create/color-accessibility"&gt;Adobe Accessiblity&lt;/a&gt;&lt;br&gt;
Shows the color palette in all color blind filters and tells if they are safe to use. But can use only 5 colors at a time&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://bit.ly/3dcHGmp"&gt;Dalton&lt;/a&gt; &lt;em&gt;only in chrome&lt;/em&gt;&lt;br&gt;
An extension to apply color blindness filters to your webpage&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://webaim.org/resources/contrastchecker/"&gt;contrast checker&lt;/a&gt;, &lt;a href="https://whocanuse.com/"&gt;who can use&lt;/a&gt;&lt;br&gt;
To check the contrast for readability of text&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://webaim.org/resources/linkcontrastchecker/"&gt;Link contrast checker&lt;/a&gt;&lt;br&gt;
To check the contrast on embedded links between texts&lt;br&gt;
&lt;a&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  Suggestion:
&lt;/h4&gt;

&lt;p&gt;For times when you have to use a photo of an apple on the tree(red+green)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://bit.ly/3dfmHzm"&gt;color enhancer&lt;/a&gt; &lt;em&gt;only in chrome&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are color adjustment extensions where by just sliding a bar user can enhance the colors if have a difficult in distinguishing otherwise, you can suggest in beginning for users to use. I know this takes a thought and space in your design but I am sure you can find space somewhere for suggesting this perhaps when they hover over the image. It is the extra step you take that count.&lt;/p&gt;




&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion:
&lt;/h3&gt;

&lt;p&gt;Choose whatever colors you like but make sure they serve the purpose of being different. use patterns, textures, symbols, and contrasting shades of different colors, and with the tools available keep testing them. And if stuck remember monochromatic isn't a bad idea to start with.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.colorblindnesstest.org/"&gt;Color blindness test&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>design</category>
      <category>ux</category>
      <category>accessible</category>
    </item>
  </channel>
</rss>
