Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                
<div class="article-link">
  <a href="https://fjolt.com/article/css-pixel-art-generator" target="blank">Read the article</a>
</div>
<div id="pixel-art-options">
    <button class="generate-css">
        <span class="generate-css-span">Generate CSS</span>
    </button>
    <button class="reset">
        <span><i class="fal fa-sync"></i></span>
    </button>
    <div class="eraser-container">
        <div class="eraser"><i class="fal fa-eraser"></i></div>
    </div>
    <div class="colors">
        <div class="color current" style="background: white;" data-color="white"></div>
        <div class="color" style="background: #ffc231;" data-color="#ffc231"></div>
        <div class="color" style="background: #ff6c31;" data-color="#ff6c31"></div>
        <div class="color" style="background: #ff1c1c;" data-color="#ff1c1c"></div>
        <div class="color" style="background: #35c161;" data-color="#35c161"></div>
        <div class="color" style="background: #3552c1;" data-color="#3552c1"></div>
        <div class="color" style="background: #7935c1;" data-color="#7935c1"></div>
        <input type="color" class="color-picker" />
    </div>
    <div class="prebuilt">
        <div class="prebuilt current" data-prebuilt="blank">Demoes</div>
        <div class="options">
            <div class="prebuilt" data-prebuilt="mario">Mario</div>
            <div class="prebuilt" data-prebuilt="yoshi">Yoshi</div>
            <div class="prebuilt" data-prebuilt="babomb">Babomb</div>
        </div>
    </div>
</div>
<div id="pixel-art-area">
</div>
<div id="popup-pixel-art">
    <h2>Pixel Art Code</h2>
    <p>Copy the code below to use this on your webpage</p>
    <div class="close"><i class="fal fa-times"></i></div>
</div>
<script defer="" src="https://kit.fontawesome.com/628c8d2499.js" crossorigin="anonymous"></script>

              
            
!

CSS

              
                body {
  background: rgb(10 13 37);
  color: white;
  padding: 2ren;
}
code {
    font-family: Menlo, Monaco, 'Courier New', monospace;
    font-size: 1rem;
    border-radius: 10px;
    left: 5px;
    margin-top: 0rem;
    overflow: auto;
    box-sizing: border-box;
    padding: 0 1.5rem 6.5rem 1.5rem;
    display: block;
    max-height: 500px;
    line-height: 1.25rem;
    border-radius: 12px;
    width: 100%;
    float: left;
    background: #1d2146a3;
    font-size: 0.875rem;
    max-width: 100%;
}
input {
  background: transparent;
}
button {
      height: 2.25rem;
    /* margin: 1rem 0 0 0; */
    /* width: 50%; */
    list-style: circle;
    cursor: pointer;
    float: left;
    background: linear-gradient(
45deg,#027cfd,#027cfd);
    /* border-radius: 5px; */
    font-family: Inter, sans-serif;
    padding: 0.25rem 1rem;
    border-radius: 7px;
    width: auto;
    color: white;
    text-decoration: none;
    font-variation-settings: 'wght' 800;
    /* font-size: 1rem; */
    border: none;
    margin: 1rem 0 0 0;
    box-shadow: 0 2px 20px #000000c4;
    font-size: 1rem;
    letter-spacing: 0.5px;
}
#pixel-art-area {
    display: flex;
    flex-direction: row;
    flex-flow: wrap;
    overflow: hidden;
    border-radius: 4px;
    padding: 2px 0 2px 2px;
}

#pixel-art-area .pixel {
    width: 0.825rem;
    margin: 0 2px 2px 0;
    height: 0.825rem;
    cursor: pointer;
    border-radius: 1px;
    background: #101532;
}

input[type="color"] { 
    height: 2rem;
    padding: 0;
    border-radius: 10px;
    height: 1.5rem;
    position: relative;
    border: none;
    cursor: pointer;
}

#pixel-art-options {
    display: flex;
}

.generate-css, .reset, .prebuilt > .current {    
    background: #3e40624a;
    box-shadow: none;
    margin: 0 1rem 1rem 0;
    font-variation-settings: 'wght' 400;
    letter-spacing: 0;
    border-radius: 4px;
    transform: scale(1);
    transition: all 0.05s ease-out;
}

.prebuilt .current:after {
    content: '\f078';
    margin: 0 0 0 0.5rem;
    font-family: 'Font Awesome 5 Pro', sans-serif;
}
.reset svg {
    margin: 0;
    padding: 0;
}

.generate-css:hover, .reset:hover, .prebuilt > .current:hover {
    background: #6366914a;
    transform: scale(1.02);
}

.prebuilt > .current {
    border-radius: 4px;
    padding: 0.25rem 1rem;
    line-height: 1.5rem;
    margin: 0 0 0 1.5rem;
}
.colors {
    margin-left: auto;
    margin-bottom: 1rem;
    position: relative;
    display: flex;
    align-items: center;
}

.colors > div {
    width: 1rem;
    cursor: pointer;
    height: 1rem;
    position: relative;
    border-radius: 100px;
    margin: 0 0.5rem 0 0;
}

.colors > div.current:after, input.current:after  {
    border: 1px solid rgba(255,255,255,0.4);
    position: absolute;
    content: '';
    border-radius: 100px;
    top: -3px;
    left: -3px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
}
input.current:after {
    top: 1px;
    left: -1px;
    width: calc(100% + 0px);
    height: calc(100% + -4px);
}
.prebuilt {
    position: relative;
    cursor: pointer;
}
.options {    
    background: #101532;
    border-radius: 4px;
    left: 1rem;
    position: absolute;
    top: 3rem;
    box-shadow: 0 1px 0 #282f55, 0 -1px 0 #3a416c, -1px 0 0 #282f55, 1px 0 0 #282f55;
}

input::-webkit-color-swatch {
    border-radius: 100px;
    width: 16px;
    cursor: pointer;
    height: 16px;
    border: none;
}

input[type="color"]:before {
    content: '';
    top: 4px;
    left: 2px;
    width: calc(100% - 4px);
    border-radius: 100px;
    height: calc(100% - 8px);
    background: rgba(255,255,255,0.125);
    position: absolute;
}

.options > div {    
    padding: 0.5rem;
    font-size: 0.925rem;
    border-bottom: 1px solid #282f547a;
    cursor: pointer;
    min-width: 150px;
}

input {
    position: relative;
}

.options {
    pointer-events: none;
    opacity: 0;
    transition: all 0.1s ease-out;
    transform: scale(0.95);
}

.options.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}

.options:after {
    content: '';
    position: absolute;
    top: -23px;
    left: 45px;
    border-color: transparent transparent #101532 transparent;
    border-width: 12px;
    border-style: solid;
}
.options:before {
    content: '';
    position: absolute;
    top: -25px;
    left: 45px;
    border-color: transparent transparent #1f2647 transparent;
    border-width: 12px;
    border-style: solid;
}

.eraser-container {
    display: flex;
    align-items: center;
    height: 2.25rem;
    position: relative;
}

.eraser {
    cursor: pointer;
}

.eraser.current:after {
    background: #24274c;
    content: '';
    top: 7px;
    left: -2px;
    width: 20px;
    border-radius: 100px;
    height: 20px;
    border: 1px solid rgba(255,255,255,0.5);
    z-index: -11;
    position: absolute;
}

#popup-pixel-art {
    position: fixed;
    background: white;
    top: 2rem;
    transform: scale(0.9);
    opacity: 0;
    pointer-events: none;
    left: 5rem;
    border-radius: 6px;
    left: calc(50% - 350px);
    width: 700px;
    padding: 1.5rem;
    box-sizing: border-box;
    max-height: calc(100% - 4rem);
    overflow: hidden;
}

#popup-pixel-art.active {
    transform: scale(1);
    opacity: 1;
    pointer-events: all;
    overflow: scroll;
}

#popup-pixel-art h2 {
    color: black;
    font-variation-settings: 'wght' 600;
    font-weight: 400;
    margin: 0 0 0rem 0;
    font-size: 1.5rem;
}

#popup-pixel-art code {
    background: #171b38;
}

#popup-pixel-art pre {
    width: calc(100% - 13rem);
}

#popup-pixel-art pre code {
    height: 185px;
}

#popup-pixel-art p {
    color: rgba(0,0,0,0.4);
    margin: 0.5rem 0 1rem 0;
    letter-spacing: 0px;
    font-size: 1rem;
    line-height: 1.5rem;
}
#popup-pixel-art pre code:before, 
#popup-pixel-art pre code:after {
    display: none;
}
.pixelart {
    position: absolute;
    top: 5.5rem;
    right: 13rem;
}

.close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    cursor: pointer;
}
.close svg {
    color: black;
}
@media screen and (max-width: 800px) {
    #pixel-art-area .pixel {
        width: 0.5rem;
        height: 0.5rem;
    }

    #pixel-art-area {
        width: calc(33rem - ( 0.325rem * 24) ) !important;
        height: calc(33rem - ( 0.325rem * 24) ) !important;
    }
    #pixel-art-options {
        width: calc(33rem - ( 0.325rem * 24) ) !important;
    }
    .colors > div {
        display: none;
    }
    .generate-css, .reset, .prebuilt > .current {  
        font-size: 0.825rem;
    }     
  
    #popup-pixel-art pre {
        width: calc(100% - 8rem);
    }
    .pixelart {
        top: 7rem;
        right: 8rem;
    }

    #popup-pixel-art {
        width: 100%;
        left: 0;
    }
}


.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
	color: #6272a4;
}

.token.punctuation {
	color: #f8f8f2;
}

.namespace {
	opacity: .7;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
	color: #66d9ef;
}

.token.boolean,
.token.number {
	color: #bd93f9;
	font-weight: bold;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
	color: #f2ff64;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
	color: #f8f8f2;
}

.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
	color: #50fa7b;
	font-style: italic;
	font-weight: bold;
}

.token.keyword {
	color: #ff79c6;
	font-weight: bold;
}

.token.regex,
.token.important {
	color: #ffb86c;
}

.token.important,
.token.bold {
	font-weight: bold;
}

.token.italic {
	font-style: italic;
}

.token.entity {
	cursor: help;
}

.token.unit {
    color: #ff79c6;
}

.article-link a {
  margin: 0 0 2rem 0;
  color: rgba(255,255,255,0.75);
  font-size: 1.125rem;
  text-decoration: none;
  display: block;
  position: absolute;
  background: black;
  padding: 0.5rem 1.25rem; 
  border-radius: 100px;
  bottom: 0.5rem;
  right: 2rem;
}

.article-link a:hover {
  color: white;
}
              
            
!

JS

              
                
let prebuilt = {
    mario: [
        { x: 7, y: 0, color: '#500000' },
        { x: 8, y: 0, color: '#500000' },
        { x: 9, y: 0, color: '#500000' },
        { x: 10, y: 0, color: '#500000' },
        { x: 11, y: 0, color: '#500000' },

        { x: 5, y: 1, color: '#500000' },
        { x: 6, y: 1, color: '#500000' },
        { x: 7, y: 1, color: '#f84070' },
        { x: 8, y: 1, color: '#f84070' },
        { x: 9, y: 1, color: '#f8d870' },
        { x: 10, y: 1, color: '#f84070' },
        { x: 11, y: 1, color: '#500000' },
        { x: 12, y: 1, color: '#500000' },
        
        { x: 4, y: 2, color: '#500000' },
        { x: 5, y: 2, color: '#f84070' },
        { x: 6, y: 2, color: '#f84070' },
        { x: 7, y: 2, color: '#b02860' },
        { x: 8, y: 2, color: '#b02860' },
        { x: 9, y: 2, color: '#d8a038' },
        { x: 10, y: 2, color: '#f8d870' },
        { x: 11, y: 2, color: '#ffffff' },
        { x: 12, y: 2, color: '#500000' },

        { x: 3, y: 3, color: '#500000' },
        { x: 4, y: 3, color: '#b02860' },
        { x: 5, y: 3, color: '#f84070' },
        { x: 6, y: 3, color: '#b02860' },
        { x: 7, y: 3, color: '#b02860' },
        { x: 8, y: 3, color: '#000000' },
        { x: 9, y: 3, color: '#000000' },
        { x: 10, y: 3, color: '#000000' },
        { x: 11, y: 3, color: '#000000' },
        { x: 12, y: 3, color: '#000000' },
        { x: 13, y: 3, color: '#000000' },
        
        { x: 2, y: 4, color: '#500000' },
        { x: 3, y: 4, color: '#b02860' },
        { x: 4, y: 4, color: '#b02860' },
        { x: 5, y: 4, color: '#b02860' },
        { x: 6, y: 4, color: '#000000' },
        { x: 7, y: 4, color: '#000000' },
        { x: 8, y: 4, color: '#000000' },
        { x: 9, y: 4, color: '#000000' },
        { x: 10, y: 4, color: '#000000' },
        { x: 11, y: 4, color: '#000000' },
        { x: 12, y: 4, color: '#000000' },
        { x: 13, y: 4, color: '#000000' },
        { x: 14, y: 4, color: '#000000' },

        { x: 2, y: 5, color: '#500000' },
        { x: 3, y: 5, color: '#f8d0c0' },
        { x: 4, y: 5, color: '#000000' },
        { x: 5, y: 5, color: '#000000' },
        { x: 6, y: 5, color: '#000000' },
        { x: 7, y: 5, color: '#f87068' },
        { x: 8, y: 5, color: '#000000' },
        { x: 9, y: 5, color: '#f87068' },
        { x: 10, y: 5, color: '#000000' },
        { x: 11, y: 5, color: '#f87068' },
        
        { x: 1, y: 6, color: '#500000' },
        { x: 2, y: 6, color: '#f8d0c0' },
        { x: 3, y: 6, color: '#885818' },
        { x: 4, y: 6, color: '#f8d0c0' },
        { x: 5, y: 6, color: '#000000' },
        { x: 6, y: 6, color: '#f87068' },
        { x: 7, y: 6, color: '#f8d0c0' },
        { x: 8, y: 6, color: '#000000' },
        { x: 9, y: 6, color: '#f8d0c0' },
        { x: 10, y: 6, color: '#000000' },
        { x: 11, y: 6, color: '#f8d0c0' },
        { x: 12, y: 6, color: '#885818' },
        { x: 13, y: 6, color: '#885818' },

        { x: 1, y: 7, color: '#500000' },
        { x: 2, y: 7, color: '#f87068' },
        { x: 3, y: 7, color: '#885818' },
        { x: 4, y: 7, color: '#f8d0c0' },
        { x: 5, y: 7, color: '#000000' },
        { x: 6, y: 7, color: '#000000' },
        { x: 7, y: 7, color: '#f8d0c0' },
        { x: 8, y: 7, color: '#f8d0c0' },
        { x: 9, y: 7, color: '#f8d0c0' },
        { x: 10, y: 7, color: '#f8d0c0' },
        { x: 11, y: 7, color: '#f8d0c0' },
        { x: 12, y: 7, color: '#f8d0c0' },
        { x: 13, y: 7, color: '#f8d0c0' },
        { x: 14, y: 7, color: '#885818' },

        { x: 1, y: 8, color: '#500000' },
        { x: 2, y: 8, color: '#000000' },
        { x: 3, y: 8, color: '#f87068' },
        { x: 4, y: 8, color: '#f8d0c0' },
        { x: 5, y: 8, color: '#000000' },
        { x: 6, y: 8, color: '#f8d0c0' },
        { x: 7, y: 8, color: '#f8d0c0' },
        { x: 8, y: 8, color: '#000000' },
        { x: 9, y: 8, color: '#f87068' },
        { x: 10, y: 8, color: '#f87068' },
        { x: 11, y: 8, color: '#f87068' },
        { x: 12, y: 8, color: '#f87068' },
        { x: 13, y: 8, color: '#f87068' },
        { x: 14, y: 8, color: '#885818' },

        { x: 2, y: 9, color: '#000000' },
        { x: 3, y: 9, color: '#885818' },
        { x: 4, y: 9, color: '#885818' },
        { x: 5, y: 9, color: '#f87068' },
        { x: 6, y: 9, color: '#f87068' },
        { x: 7, y: 9, color: '#f87068' },
        { x: 8, y: 9, color: '#000000' },
        { x: 9, y: 9, color: '#000000' },
        { x: 10, y: 9, color: '#000000' },
        { x: 11, y: 9, color: '#000000' },
        { x: 12, y: 9, color: '#000000' },
        { x: 13, y: 9, color: '#000000' },

        { x: 3, y: 10, color: '#000000' },
        { x: 4, y: 10, color: '#885818' },
        { x: 5, y: 10, color: '#885818' },
        { x: 6, y: 10, color: '#f87068' },
        { x: 7, y: 10, color: '#f87068' },
        { x: 8, y: 10, color: '#000000' },
        { x: 9, y: 10, color: '#000000' },
        { x: 10, y: 10, color: '#000000' },
        { x: 11, y: 10, color: '#000000' },
        
        { x: 4, y: 11, color: '#500000' },
        { x: 5, y: 11, color: '#b02860' },
        { x: 6, y: 11, color: '#885818' },
        { x: 7, y: 11, color: '#885818' },
        { x: 8, y: 11, color: '#885818' },
        { x: 9, y: 11, color: '#885818' },
        { x: 10, y: 11, color: '#203088' },
        
        { x: 3, y: 12, color: '#500000' },
        { x: 4, y: 12, color: '#b02860' },
        { x: 5, y: 12, color: '#b02860' },
        { x: 6, y: 12, color: '#f84070' },
        { x: 7, y: 12, color: '#408098' },
        { x: 8, y: 12, color: '#408098' },
        { x: 9, y: 12, color: '#80d8c8' },
        { x: 10, y: 12, color: '#80d8c8' },
        { x: 11, y: 12, color: '#203088' },

        { x: 3, y: 13, color: '#500000' },
        { x: 4, y: 13, color: '#885818' },
        { x: 5, y: 13, color: '#885818' },
        { x: 6, y: 13, color: '#885818' },
        { x: 7, y: 13, color: '#408098' },
        { x: 8, y: 13, color: '#ffffff' },
        { x: 9, y: 13, color: '#ffffff' },
        { x: 10, y: 13, color: '#80d8c8' },
        { x: 11, y: 13, color: '#ffffff' },
        { x: 12, y: 13, color: '#203088' },

        { x: 3, y: 14, color: '#885818' },
        { x: 4, y: 14, color: '#ffffff' },
        { x: 5, y: 14, color: '#ffffff' },
        { x: 6, y: 14, color: '#ffffff' },
        { x: 7, y: 14, color: '#885818' },
        { x: 8, y: 14, color: '#ffffff' },
        { x: 9, y: 14, color: '#ffffff' },
        { x: 10, y: 14, color: '#80d8c8' },
        { x: 11, y: 14, color: '#ffffff' },
        { x: 12, y: 14, color: '#203088' },

        { x: 3, y: 15, color: '#885818' },
        { x: 4, y: 15, color: '#ffffff' },
        { x: 5, y: 15, color: '#ffffff' },
        { x: 6, y: 15, color: '#885818' },
        { x: 7, y: 15, color: '#408098' },
        { x: 8, y: 15, color: '#408098' },
        { x: 9, y: 15, color: '#203088' },
        { x: 10, y: 15, color: '#408098' },
        { x: 11, y: 15, color: '#203088' },

        { x: 3, y: 16, color: '#885818' },
        { x: 4, y: 16, color: '#ffffff' },
        { x: 5, y: 16, color: '#ffffff' },
        { x: 6, y: 16, color: '#885818' },
        { x: 7, y: 16, color: '#408098' },
        { x: 8, y: 16, color: '#203088' },
        { x: 9, y: 16, color: '#408098' },
        { x: 10, y: 16, color: '#203088' },
        
        { x: 4, y: 17, color: '#885818' },
        { x: 5, y: 17, color: '#885818' },
        { x: 6, y: 17, color: '#885818' },
        { x: 7, y: 17, color: '#885818' },
        { x: 8, y: 17, color: '#000000' },
        { x: 9, y: 17, color: '#885818' },
        { x: 10, y: 17, color: '#000000' },

        { x: 4, y: 18, color: '#000000' },
        { x: 5, y: 18, color: '#885818' },
        { x: 6, y: 18, color: '#885818' },
        { x: 7, y: 18, color: '#885818' },
        { x: 8, y: 18, color: '#f8d870' },
        { x: 9, y: 18, color: '#000000' },
        { x: 10, y: 18, color: '#f8d870' },
        { x: 11, y: 18, color: '#000000' },

        { x: 4, y: 19, color: '#000000' },
        { x: 5, y: 19, color: '#000000' },
        { x: 6, y: 19, color: '#000000' },
        { x: 7, y: 19, color: '#000000' },
        { x: 8, y: 19, color: '#000000' },
        { x: 9, y: 19, color: '#000000' },
        { x: 10, y: 19, color: '#000000' },
        { x: 11, y: 19, color: '#000000' },

    ],
    babomb: [
        { x: 8, y: 0, color: '#c37200' },

        { x: 4, y: 1, color: '#c77100' },
        { x: 5, y: 1, color: '#c77100' },
        { x: 6, y: 1, color: '#556282' },
        { x: 7, y: 1, color: '#914708' },

        { x: 4, y: 2, color: '#c76e06' },
        { x: 5, y: 2, color: '#fcee43' },
        { x: 6, y: 2, color: '#fcee43' },
        { x: 7, y: 2, color: '#f8c206' },
        { x: 8, y: 2, color: '#d16d00' },
        
        { x: 5, y: 3, color: '#cc6e00' },
        { x: 6, y: 3, color: '#fbed42' },
        { x: 7, y: 3, color: '#fbed42' },
        { x: 8, y: 3, color: '#fbc106' },
        { x: 9, y: 3, color: '#c47400' },
        
        { x: 3, y: 4, color: '#924a00' },
        { x: 4, y: 4, color: '#c67100' },
        { x: 5, y: 4, color: '#ffbf01' },
        { x: 6, y: 4, color: '#fbee40' },
        { x: 7, y: 4, color: '#ffc000' },
        { x: 8, y: 4, color: '#9e4203' },
        { x: 9, y: 4, color: '#1b161a' },

        { x: 4, y: 5, color: '#a53f01' },
        { x: 5, y: 5, color: '#cc690b' },
        { x: 6, y: 5, color: '#f6c403' },
        { x: 9, y: 5, color: '#22304b' },

        { x: 7, y: 6, color: '#223148' },
        { x: 8, y: 6, color: '#586084' },
        { x: 9, y: 6, color: '#9fa5bb' },
        { x: 10, y: 6, color: '#9fa5bb' },
        { x: 11, y: 6, color: '#5a5f85' },

        { x: 5, y: 7, color: '#23314c' },
        { x: 6, y: 7, color: '#23314c' },
        { x: 7, y: 7, color: '#5a5f87' },
        { x: 8, y: 7, color: '#a1a6ba' },
        { x: 9, y: 7, color: '#ffffff' },
        { x: 10, y: 7, color: '#ffffff' },
        { x: 11, y: 7, color: '#9fa7ba' },
        { x: 12, y: 7, color: '#5a6084' },

        { x: 4, y: 8, color: '#23314c' },
        { x: 5, y: 8, color: '#23314c' },
        { x: 6, y: 8, color: '#5a5f85' },
        { x: 7, y: 8, color: '#292a2e' },
        { x: 8, y: 8, color: '#414141' },
        { x: 9, y: 8, color: '#414141' },
        { x: 10, y: 8, color: '#414141' },
        { x: 11, y: 8, color: '#2b2b29' },
        { x: 12, y: 8, color: '#5a5f85' },
        { x: 13, y: 8, color: '#5a5f85' },

        { x: 3, y: 9, color: '#23314c' },
        { x: 4, y: 9, color: '#5a5d8a' },
        { x: 5, y: 9, color: '#1c180f' },
        { x: 6, y: 9, color: '#262827' },
        { x: 7, y: 9, color: '#424242' },
        { x: 8, y: 9, color: '#424242' },
        { x: 9, y: 9, color: '#666666' },
        { x: 10, y: 9, color: '#666666' },
        { x: 11, y: 9, color: '#424242' },
        { x: 12, y: 9, color: '#424242' },
        { x: 13, y: 9, color: '#2a2a2a' },
        
        { x: 3, y: 10, color: '#21314b' },
        { x: 4, y: 10, color: '#171717' },
        { x: 5, y: 10, color: '#2a2a2a' },
        { x: 6, y: 10, color: '#424242' },
        { x: 7, y: 10, color: '#424242' },
        { x: 8, y: 10, color: '#666666' },
        { x: 9, y: 10, color: '#666666' },
        { x: 10, y: 10, color: '#666666' },
        { x: 11, y: 10, color: '#666666' },
        { x: 12, y: 10, color: '#424242' },
        { x: 13, y: 10, color: '#424242' },
        { x: 14, y: 10, color: '#2b2b2b' },
        
        { x: 3, y: 11, color: '#191919' },
        { x: 4, y: 11, color: '#2a2a2a' },
        { x: 5, y: 11, color: '#2a2a2a' },
        { x: 6, y: 11, color: '#424242' },
        { x: 7, y: 11, color: '#424242' },
        { x: 8, y: 11, color: '#666666' },
        { x: 9, y: 11, color: '#666666' },
        { x: 10, y: 11, color: '#5a5f85' },
        { x: 11, y: 11, color: '#656565' },
        { x: 12, y: 11, color: '#656565' },
        { x: 13, y: 11, color: '#434240' },
        { x: 14, y: 11, color: '#5a5f85' },
        { x: 15, y: 11, color: '#2e2e2e' },
        
        { x: 3, y: 12, color: '#2a2a2a' },
        { x: 4, y: 12, color: '#2a2a2a' },
        { x: 5, y: 12, color: '#2a2a2a' },
        { x: 6, y: 12, color: '#424242' },
        { x: 7, y: 12, color: '#424242' },
        { x: 8, y: 12, color: '#666666' },
        { x: 9, y: 12, color: '#585d94' },
        { x: 10, y: 12, color: '#ffffff' },
        { x: 11, y: 12, color: '#9fa7ba' },
        { x: 12, y: 12, color: '#696562' },
        { x: 13, y: 12, color: '#586084' },
        { x: 14, y: 12, color: '#ffffff' },
        { x: 15, y: 12, color: '#454641' },
        
        { x: 2, y: 13, color: '#171717' },
        { x: 3, y: 13, color: '#2a2a2a' },
        { x: 4, y: 13, color: '#2a2a2a' },
        { x: 5, y: 13, color: '#2a2a2a' },
        { x: 6, y: 13, color: '#424242' },
        { x: 7, y: 13, color: '#424242' },
        { x: 8, y: 13, color: '#666666' },
        { x: 9, y: 13, color: '#a1a5c0' },
        { x: 10, y: 13, color: '#ffffff' },
        { x: 11, y: 13, color: '#696468' },
        { x: 12, y: 13, color: '#676566' },
        { x: 13, y: 13, color: '#a0a6bc' },
        { x: 14, y: 13, color: '#ffffff' },
        { x: 15, y: 13, color: '#a0a6bc' },
        { x: 16, y: 13, color: '#171717' },

        { x: 2, y: 14, color: '#171717' },
        { x: 3, y: 14, color: '#171717' },
        { x: 4, y: 14, color: '#2a2a2a' },
        { x: 5, y: 14, color: '#2a2a2a' },
        { x: 6, y: 14, color: '#424242' },
        { x: 7, y: 14, color: '#424242' },
        { x: 8, y: 14, color: '#424242' },
        { x: 9, y: 14, color: '#9fa8b9' },
        { x: 10, y: 14, color: '#ffffff' },
        { x: 11, y: 14, color: '#9fa8b9' },
        { x: 12, y: 14, color: '#656766' },
        { x: 13, y: 14, color: '#9fa8b9' },
        { x: 14, y: 14, color: '#ffffff' },
        { x: 15, y: 14, color: '#9fa8b9' },
        { x: 16, y: 14, color: '#292b2a' },

        { x: 2, y: 15, color: '#171717' },
        { x: 3, y: 15, color: '#171717' },
        { x: 4, y: 15, color: '#2a2a2a' },
        { x: 5, y: 15, color: '#2a2a2a' },
        { x: 6, y: 15, color: '#424242' },
        { x: 7, y: 15, color: '#424242' },
        { x: 8, y: 15, color: '#424242' },
        { x: 9, y: 15, color: '#5a6084' },
        { x: 10, y: 15, color: '#ffffff' },
        { x: 11, y: 15, color: '#5a6084' },
        { x: 12, y: 15, color: '#66675f' },
        { x: 13, y: 15, color: '#586084' },
        { x: 14, y: 15, color: '#ffffff' },
        { x: 15, y: 15, color: '#586084' },
        { x: 16, y: 15, color: '#2a2a2a' },

        { x: 2, y: 16, color: '#171717' },
        { x: 3, y: 16, color: '#171717' },
        { x: 4, y: 16, color: '#171717' },
        { x: 5, y: 16, color: '#2a2a2a' },
        { x: 6, y: 16, color: '#2a2a2a' },
        { x: 7, y: 16, color: '#424242' },
        { x: 8, y: 16, color: '#424242' },
        { x: 9, y: 16, color: '#1e3352' },
        { x: 10, y: 16, color: '#9fa8b9' },
        { x: 11, y: 16, color: '#5a6080' },
        { x: 12, y: 16, color: '#434240' },
        { x: 13, y: 16, color: '#25304c' },
        { x: 14, y: 16, color: '#9fa8b9' },
        { x: 15, y: 16, color: '#595e88' },
        { x: 16, y: 16, color: '#2a2a2a' },
        
        { x: 2, y: 17, color: '#171717' },
        { x: 3, y: 17, color: '#171717' },
        { x: 4, y: 17, color: '#171717' },
        { x: 5, y: 17, color: '#2a2a2a' },
        { x: 6, y: 17, color: '#2a2a2a' },
        { x: 7, y: 17, color: '#424242' },
        { x: 8, y: 17, color: '#424242' },
        { x: 9, y: 17, color: '#424242' },
        { x: 10, y: 17, color: '#25334e' },
        { x: 11, y: 17, color: '#424242' },
        { x: 12, y: 17, color: '#424242' },
        { x: 13, y: 17, color: '#424242' },
        { x: 14, y: 17, color: '#26304b' },
        { x: 15, y: 17, color: '#2a2a2c' },
        { x: 16, y: 17, color: '#171717' },
        
        { x: 3, y: 18, color: '#171717' },
        { x: 4, y: 18, color: '#171717' },
        { x: 5, y: 18, color: '#171717' },
        { x: 6, y: 18, color: '#2a2a2a' },
        { x: 7, y: 18, color: '#2a2a2a' },
        { x: 8, y: 18, color: '#414141' },
        { x: 9, y: 18, color: '#414141' },
        { x: 10, y: 18, color: '#414141' },
        { x: 11, y: 18, color: '#414141' },
        { x: 12, y: 18, color: '#2a2a2a' },
        { x: 13, y: 18, color: '#2a2a2a' },
        { x: 14, y: 18, color: '#2a2a2a' },
        { x: 15, y: 18, color: '#171717' },
        
        { x: 3, y: 19, color: '#cc6c08' },
        { x: 4, y: 19, color: '#f9c300' },
        { x: 5, y: 19, color: '#cc6c08' },
        { x: 6, y: 19, color: '#171717' },
        { x: 7, y: 19, color: '#2b2b2b' },
        { x: 8, y: 19, color: '#2b2b2b' },
        { x: 9, y: 19, color: '#2b2b2b' },
        { x: 10, y: 19, color: '#2b2b2b' },
        { x: 11, y: 19, color: '#2b2b2b' },
        { x: 12, y: 19, color: '#2b2b2b' },
        { x: 13, y: 19, color: '#2b2b2b' },
        { x: 14, y: 19, color: '#171717' },
        { x: 15, y: 19, color: '#171717' },
        { x: 16, y: 19, color: '#c96f00' },
        
        { x: 2, y: 20, color: '#c67001' },
        { x: 3, y: 20, color: '#ffbb06' },
        { x: 4, y: 20, color: '#fbee40' },
        { x: 5, y: 20, color: '#fbee40' },
        { x: 6, y: 20, color: '#f9c300' },
        { x: 7, y: 20, color: '#d36600' },
        { x: 8, y: 20, color: '#181619' },
        { x: 9, y: 20, color: '#2a2a2a' },
        { x: 10, y: 20, color: '#2a2a2a' },
        { x: 11, y: 20, color: '#2a2a2a' },
        { x: 12, y: 20, color: '#191a1e' },
        { x: 13, y: 20, color: '#191a1e' },
        { x: 14, y: 20, color: '#191a1e' },
        { x: 15, y: 20, color: '#c27300' },
        { x: 16, y: 20, color: '#fcc302' },
        { x: 17, y: 20, color: '#c27300' },
        
        { x: 1, y: 21, color: '#cc6b0d' },
        { x: 2, y: 21, color: '#fcc200' },
        { x: 3, y: 21, color: '#fcc200' },
        { x: 4, y: 21, color: '#faed46' },
        { x: 5, y: 21, color: '#faed46' },
        { x: 6, y: 21, color: '#faed46' },
        { x: 7, y: 21, color: '#f9c203' },
        { x: 8, y: 21, color: '#c96e05' },
        { x: 9, y: 21, color: '#171717' },
        { x: 10, y: 21, color: '#171717' },
        { x: 11, y: 21, color: '#171717' },
        { x: 12, y: 21, color: '#171717' },
        { x: 13, y: 21, color: '#171717' },
        { x: 14, y: 21, color: '#c67100' },
        { x: 15, y: 21, color: '#f9c206' },
        { x: 16, y: 21, color: '#f9c206' },
        { x: 17, y: 21, color: '#ffef47' },
        { x: 18, y: 21, color: '#fbc201' },
        
        { x: 1, y: 22, color: '#98460a' },
        { x: 2, y: 22, color: '#c96f00' },
        { x: 3, y: 22, color: '#fbc200' },
        { x: 4, y: 22, color: '#fbc200' },
        { x: 5, y: 22, color: '#fded40' },
        { x: 6, y: 22, color: '#fded40' },
        { x: 7, y: 22, color: '#fbc106' },
        { x: 8, y: 22, color: '#fbc106' },
        { x: 9, y: 22, color: '#171717' },
        { x: 10, y: 22, color: '#171717' },
        { x: 11, y: 22, color: '#171717' },
        { x: 12, y: 22, color: '#8f470d' },
        { x: 13, y: 22, color: '#fbc200' },
        { x: 14, y: 22, color: '#fbc200' },
        { x: 15, y: 22, color: '#fbc200' },
        { x: 16, y: 22, color: '#fded42' },
        { x: 17, y: 22, color: '#fded42' },
        { x: 18, y: 22, color: '#fcc101' },
        
        { x: 2, y: 23, color: '#924801' },
        { x: 3, y: 23, color: '#c96f00' },
        { x: 4, y: 23, color: '#c96f00' },
        { x: 5, y: 23, color: '#c96f00' },
        { x: 6, y: 23, color: '#c96f00' },
        { x: 7, y: 23, color: '#924801' },
        { x: 11, y: 23, color: '#924801' },
        { x: 12, y: 23, color: '#c86e00' },
        { x: 13, y: 23, color: '#c86e00' },
        { x: 14, y: 23, color: '#914700' },
        { x: 15, y: 23, color: '#fbc201' },
        { x: 16, y: 23, color: '#fbc201' },
        { x: 17, y: 23, color: '#fbc201' }
        
    ],
    yoshi: [
        { x: 13, y: 0, color: '#2c2b2c' },
        { x: 14, y: 0, color: '#2c2b2c' },
        { x: 16, y: 0, color: '#2c2b2c' },
        { x: 17, y: 0, color: '#2c2b2c' },

        { x: 12, y: 1, color: '#2c2b2c' },
        { x: 13, y: 1, color: '#26b300' },
        { x: 14, y: 1, color: '#10ff1c' },
        { x: 15, y: 1, color: '#2c2b2c' },
        { x: 16, y: 1, color: '#26b300' },
        { x: 17, y: 1, color: '#10ff1c' },
        { x: 18, y: 1, color: '#2c2b2c' },

        { x: 11, y: 2, color: '#2c2b2c' },
        { x: 12, y: 2, color: '#016f00' },
        { x: 13, y: 2, color: '#26b300' },
        { x: 14, y: 2, color: '#fefcfc' },
        { x: 15, y: 2, color: '#fefcfc' },
        { x: 16, y: 2, color: '#fefcfc' },
        { x: 17, y: 2, color: '#fefcfc' },
        { x: 18, y: 2, color: '#10ff1c' },
        { x: 19, y: 2, color: '#2c2b2c' },

        { x: 8, y: 3, color: '#2c2b2c' },
        { x: 9, y: 3, color: '#2c2b2c' },
        { x: 10, y: 3, color: '#2c2b2c' },
        { x: 11, y: 3, color: '#2c2b2c' },
        { x: 12, y: 3, color: '#016f00' },
        { x: 13, y: 3, color: '#fefcfc' },
        { x: 14, y: 3, color: '#fefcfc' },
        { x: 15, y: 3, color: '#2c2b2c' },
        { x: 16, y: 3, color: '#fefcfc' },
        { x: 17, y: 3, color: '#2c2b2c' },
        { x: 18, y: 3, color: '#fefcfc' },
        { x: 19, y: 3, color: '#2c2b2c' },

        { x: 7, y: 4, color: '#2c2b2c' },
        { x: 8, y: 4, color: '#fe3217' },
        { x: 9, y: 4, color: '#ff7e14' },
        { x: 10, y: 4, color: '#ff7e14' },
        { x: 11, y: 4, color: '#2c2b2c' },
        { x: 12, y: 4, color: '#fefcfc' },
        { x: 13, y: 4, color: '#fefcfc' },
        { x: 14, y: 4, color: '#fefcfc' },
        { x: 15, y: 4, color: '#2c2b2c' },
        { x: 16, y: 4, color: '#fefcfc' },
        { x: 17, y: 4, color: '#2c2b2c' },
        { x: 18, y: 4, color: '#fefcfc' },
        { x: 19, y: 4, color: '#2c2b2c' },

        { x: 7, y: 5, color: '#2c2b2c' },
        { x: 8, y: 5, color: '#9c1d00' },
        { x: 9, y: 5, color: '#fe3217' },
        { x: 10, y: 5, color: '#2c2b2c' },
        { x: 11, y: 5, color: '#2c2b2c' },
        { x: 12, y: 5, color: '#fefcfc' },
        { x: 13, y: 5, color: '#fefcfc' },
        { x: 14, y: 5, color: '#fefcfc' },
        { x: 15, y: 5, color: '#fefcfc' },
        { x: 16, y: 5, color: '#fefcfc' },
        { x: 17, y: 5, color: '#fefcfc' },
        { x: 18, y: 5, color: '#fefcfc' },
        { x: 19, y: 5, color: '#2c2b2c' },
        { x: 20, y: 5, color: '#2c2b2c' },
        { x: 21, y: 5, color: '#2c2b2c' },

        { x: 7, y: 6, color: '#2c2b2c' },
        { x: 8, y: 6, color: '#2c2b2c' },
        { x: 9, y: 6, color: '#2c2b2c' },
        { x: 10, y: 6, color: '#10ff1c' },
        { x: 11, y: 6, color: '#10ff1c' },
        { x: 12, y: 6, color: '#016f00' },
        { x: 13, y: 6, color: '#fefcfc' },
        { x: 14, y: 6, color: '#fefcfc' },
        { x: 15, y: 6, color: '#fefcfc' },
        { x: 16, y: 6, color: '#016f00' },
        { x: 17, y: 6, color: '#fefcfc' },
        { x: 18, y: 6, color: '#2c2b2c' },
        { x: 19, y: 6, color: '#10ff1c' },
        { x: 20, y: 6, color: '#10ff1c' },
        { x: 21, y: 6, color: '#10ff1c' },
        { x: 22, y: 6, color: '#2c2b2c' },

        { x: 6, y: 7, color: '#2c2b2c' },
        { x: 7, y: 7, color: '#ff7e14' },
        { x: 8, y: 7, color: '#2c2b2c' },
        { x: 9, y: 7, color: '#26b300' },
        { x: 10, y: 7, color: '#10ff1c' },
        { x: 11, y: 7, color: '#fefcfc' },
        { x: 12, y: 7, color: '#10ff1c' },
        { x: 13, y: 7, color: '#016f00' },
        { x: 14, y: 7, color: '#016f00' },
        { x: 15, y: 7, color: '#016f00' },
        { x: 16, y: 7, color: '#10ff1c' },
        { x: 17, y: 7, color: '#016f00' },
        { x: 18, y: 7, color: '#10ff1c' },
        { x: 19, y: 7, color: '#10ff1c' },
        { x: 20, y: 7, color: '#fefcfc' },
        { x: 21, y: 7, color: '#fefcfc' },
        { x: 22, y: 7, color: '#10ff1c' },
        { x: 23, y: 7, color: '#2c2b2c' },

        { x: 5, y: 8, color: '#2c2b2c' },
        { x: 6, y: 8, color: '#9c1d00' },
        { x: 7, y: 8, color: '#9c1d00' },
        { x: 8, y: 8, color: '#2c2b2c' },
        { x: 9, y: 8, color: '#016f00' },
        { x: 10, y: 8, color: '#26b300' },
        { x: 11, y: 8, color: '#fefcfc' },
        { x: 12, y: 8, color: '#fefcfc' },
        { x: 13, y: 8, color: '#fefcfc' },
        { x: 14, y: 8, color: '#10ff1c' },
        { x: 15, y: 8, color: '#26b300' },
        { x: 16, y: 8, color: '#10ff1c' },
        { x: 17, y: 8, color: '#10ff1c' },
        { x: 18, y: 8, color: '#10ff1c' },
        { x: 19, y: 8, color: '#2c2b2c' },
        { x: 20, y: 8, color: '#fefcfc' },
        { x: 21, y: 8, color: '#2c2b2c' },
        { x: 22, y: 8, color: '#10ff1c' },
        { x: 23, y: 8, color: '#2c2b2c' },

        { x: 5, y: 9, color: '#2c2b2c' },
        { x: 6, y: 9, color: '#9c1d00' },
        { x: 7, y: 9, color: '#9c1d00' },
        { x: 8, y: 9, color: '#2c2b2c' },
        { x: 9, y: 9, color: '#016f00' },
        { x: 10, y: 9, color: '#26b300' },
        { x: 11, y: 9, color: '#fefcfc' },
        { x: 12, y: 9, color: '#fefcfc' },
        { x: 13, y: 9, color: '#fefcfc' },
        { x: 14, y: 9, color: '#fefcfc' },
        { x: 15, y: 9, color: '#2c2b2c' },
        { x: 16, y: 9, color: '#26b300' },
        { x: 17, y: 9, color: '#26b300' },
        { x: 18, y: 9, color: '#10ff1c' },
        { x: 19, y: 9, color: '#10ff1c' },
        { x: 20, y: 9, color: '#10ff1c' },
        { x: 21, y: 9, color: '#10ff1c' },
        { x: 22, y: 9, color: '#10ff1c' },
        { x: 23, y: 9, color: '#2c2b2c' },

        { x: 6, y: 10, color: '#2c2b2c' },
        { x: 7, y: 10, color: '#2c2b2c' },
        { x: 8, y: 10, color: '#2c2b2c' },
        { x: 9, y: 10, color: '#016f00' },
        { x: 10, y: 10, color: '#26b300' },
        { x: 11, y: 10, color: '#fefcfc' },
        { x: 12, y: 10, color: '#fefcfc' },
        { x: 13, y: 10, color: '#fefcfc' },
        { x: 14, y: 10, color: '#fefcfc' },
        { x: 15, y: 10, color: '#2c2b2c' },
        { x: 16, y: 10, color: '#26b300' },
        { x: 17, y: 10, color: '#26b300' },
        { x: 18, y: 10, color: '#10ff1c' },
        { x: 19, y: 10, color: '#10ff1c' },
        { x: 20, y: 10, color: '#10ff1c' },
        { x: 21, y: 10, color: '#10ff1c' },
        { x: 22, y: 10, color: '#10ff1c' },
        { x: 23, y: 10, color: '#2c2b2c' },

        { x: 7, y: 11, color: '#2c2b2c' },
        { x: 8, y: 11, color: '#fe3217' },
        { x: 9, y: 11, color: '#2c2b2c' },
        { x: 10, y: 11, color: '#016f00' },
        { x: 11, y: 11, color: '#016f00' },
        { x: 12, y: 11, color: '#ffba93' },
        { x: 13, y: 11, color: '#ffba93' },
        { x: 14, y: 11, color: '#2c2b2c' },
        { x: 15, y: 11, color: '#2c2b2c' },
        { x: 16, y: 11, color: '#016f00' },
        { x: 17, y: 11, color: '#016f00' },
        { x: 18, y: 11, color: '#26b300' },
        { x: 19, y: 11, color: '#26b300' },
        { x: 20, y: 11, color: '#26b300' },
        { x: 21, y: 11, color: '#26b300' },
        { x: 22, y: 11, color: '#26b300' },
        { x: 23, y: 11, color: '#2c2b2c' },

        { x: 8, y: 12, color: '#2c2b2c' },
        { x: 9, y: 12, color: '#2c2b2c' },
        { x: 10, y: 12, color: '#2c2b2c' },
        { x: 11, y: 12, color: '#016f00' },
        { x: 12, y: 12, color: '#016f00' },
        { x: 13, y: 12, color: '#ffba93' },
        { x: 14, y: 12, color: '#ffba93' },
        { x: 15, y: 12, color: '#2c2b2c' },
        { x: 16, y: 12, color: '#016f00' },
        { x: 17, y: 12, color: '#016f00' },
        { x: 18, y: 12, color: '#016f00' },
        { x: 19, y: 12, color: '#016f00' },
        { x: 20, y: 12, color: '#26b300' },
        { x: 21, y: 12, color: '#26b300' },
        { x: 22, y: 12, color: '#2c2b2c' },

        { x: 8, y: 13, color: '#2c2b2c' },
        { x: 9, y: 13, color: '#fe3217' },
        { x: 10, y: 13, color: '#2c2b2c' },
        { x: 11, y: 13, color: '#016f00' },
        { x: 12, y: 13, color: '#26b300' },
        { x: 13, y: 13, color: '#ffa5aa' },
        { x: 14, y: 13, color: '#ffa5aa' },
        { x: 15, y: 13, color: '#fefcfc' },
        { x: 16, y: 13, color: '#2c2b2c' },
        { x: 17, y: 13, color: '#016f00' },
        { x: 18, y: 13, color: '#016f00' },
        { x: 19, y: 13, color: '#016f00' },
        { x: 20, y: 13, color: '#2c2b2c' },
        { x: 21, y: 13, color: '#2c2b2c' },

        { x: 5, y: 14, color: '#2c2b2c' },
        { x: 6, y: 14, color: '#2c2b2c' },
        { x: 7, y: 14, color: '#2c2b2c' },
        { x: 8, y: 14, color: '#2c2b2c' },
        { x: 9, y: 14, color: '#2c2b2c' },
        { x: 10, y: 14, color: '#016f00' },
        { x: 11, y: 14, color: '#26b300' },
        { x: 12, y: 14, color: '#26b300' },
        { x: 13, y: 14, color: '#ffa5aa' },
        { x: 14, y: 14, color: '#ffa5aa' },
        { x: 15, y: 14, color: '#2c2b2c' },
        { x: 16, y: 14, color: '#2c2b2c' },
        { x: 17, y: 14, color: '#2c2b2c' },
        { x: 18, y: 14, color: '#2c2b2c' },
        { x: 19, y: 14, color: '#2c2b2c' },

        { x: 4, y: 15, color: '#2c2b2c' },
        { x: 5, y: 15, color: '#ff7e14' },
        { x: 6, y: 15, color: '#fefcfc' },
        { x: 7, y: 15, color: '#2c2b2c' },
        { x: 8, y: 15, color: '#2c2b2c' },
        { x: 9, y: 15, color: '#2c2b2c' },
        { x: 10, y: 15, color: '#016f00' },
        { x: 11, y: 15, color: '#26b300' },
        { x: 12, y: 15, color: '#fefcfc' },
        { x: 13, y: 15, color: '#fefcfc' },
        { x: 14, y: 15, color: '#fefcfc' },
        { x: 15, y: 15, color: '#2c2b2c' },
        { x: 16, y: 15, color: '#2c2b2c' },

        { x: 2, y: 16, color: '#2c2b2c' },
        { x: 3, y: 16, color: '#2c2b2c' },
        { x: 4, y: 16, color: '#ff7e14' },
        { x: 5, y: 16, color: '#ff7e14' },
        { x: 6, y: 16, color: '#2c2b2c' },
        { x: 7, y: 16, color: '#2c2b2c' },
        { x: 8, y: 16, color: '#10ff1c' },
        { x: 9, y: 16, color: '#10ff1c' },
        { x: 10, y: 16, color: '#10ff1c' },
        { x: 11, y: 16, color: '#10ff1c' },
        { x: 12, y: 16, color: '#fefcfc' },
        { x: 13, y: 16, color: '#fefcfc' },
        { x: 14, y: 16, color: '#fefcfc' },
        { x: 15, y: 16, color: '#2c2b2c' },
        { x: 16, y: 16, color: '#fefcfc' },
        { x: 17, y: 16, color: '#2c2b2c' },

        { x: 0, y: 17, color: '#2c2b2c' },
        { x: 1, y: 17, color: '#2c2b2c' },
        { x: 2, y: 17, color: '#2c2b2c' },
        { x: 3, y: 17, color: '#fefcfc' },
        { x: 4, y: 17, color: '#2c2b2c' },
        { x: 5, y: 17, color: '#2c2b2c' },
        { x: 6, y: 17, color: '#26b300' },
        { x: 7, y: 17, color: '#26b300' },
        { x: 8, y: 17, color: '#10ff1c' },
        { x: 9, y: 17, color: '#10ff1c' },
        { x: 10, y: 17, color: '#2c2b2c' },
        { x: 11, y: 17, color: '#fefcfc' },
        { x: 12, y: 17, color: '#fefcfc' },
        { x: 13, y: 17, color: '#fefcfc' },
        { x: 14, y: 17, color: '#2c2b2c' },
        { x: 15, y: 17, color: '#2c2b2c' },
        { x: 16, y: 17, color: '#fefcfc' },
        { x: 17, y: 17, color: '#10ff1c' },
        { x: 18, y: 17, color: '#2c2b2c' },

        { x: 0, y: 18, color: '#2c2b2c' },
        { x: 1, y: 18, color: '#10ff1c' },
        { x: 2, y: 18, color: '#26b300' },
        { x: 3, y: 18, color: '#2c2b2c' },
        { x: 4, y: 18, color: '#2c2b2c' },
        { x: 5, y: 18, color: '#10ff1c' },
        { x: 6, y: 18, color: '#10ff1c' },
        { x: 7, y: 18, color: '#10ff1c' },
        { x: 8, y: 18, color: '#10ff1c' },
        { x: 9, y: 18, color: '#2c2b2c' },
        { x: 10, y: 18, color: '#fefcfc' },
        { x: 11, y: 18, color: '#fefcfc' },
        { x: 12, y: 18, color: '#fefcfc' },
        { x: 13, y: 18, color: '#2c2b2c' },
        { x: 14, y: 18, color: '#2c2b2c' },
        { x: 15, y: 18, color: '#10ff1c' },
        { x: 16, y: 18, color: '#10ff1c' },
        { x: 17, y: 18, color: '#10ff1c' },
        { x: 18, y: 18, color: '#2c2b2c' },


        { x: 0, y: 19, color: '#2c2b2c' },
        { x: 1, y: 19, color: '#fefcfc' },
        { x: 2, y: 19, color: '#016f00' },
        { x: 3, y: 19, color: '#2c2b2c' },
        { x: 4, y: 19, color: '#10ff1c' },
        { x: 5, y: 19, color: '#10ff1c' },
        { x: 6, y: 19, color: '#10ff1c' },
        { x: 7, y: 19, color: '#10ff1c' },
        { x: 8, y: 19, color: '#fefcfc' },
        { x: 9, y: 19, color: '#fefcfc' },
        { x: 10, y: 19, color: '#2c2b2c' },
        { x: 11, y: 19, color: '#fefcfc' },
        { x: 12, y: 19, color: '#fefcfc' },
        { x: 13, y: 19, color: '#fefcfc' },
        { x: 14, y: 19, color: '#2c2b2c' },
        { x: 15, y: 19, color: '#2c2b2c' },
        { x: 16, y: 19, color: '#10ff1c' },
        { x: 17, y: 19, color: '#10ff1c' },
        { x: 18, y: 19, color: '#2c2b2c' },

        { x: 0, y: 20, color: '#2c2b2c' },
        { x: 1, y: 20, color: '#fefcfc' },
        { x: 2, y: 20, color: '#fefcfc' },
        { x: 3, y: 20, color: '#2c2b2c' },
        { x: 4, y: 20, color: '#26b300' },
        { x: 5, y: 20, color: '#10ff1c' },
        { x: 6, y: 20, color: '#10ff1c' },
        { x: 7, y: 20, color: '#fefcfc' },
        { x: 8, y: 20, color: '#fefcfc' },
        { x: 9, y: 20, color: '#2c2b2c' },
        { x: 10, y: 20, color: '#2c2b2c' },
        { x: 11, y: 20, color: '#fefcfc' },
        { x: 12, y: 20, color: '#fefcfc' },
        { x: 13, y: 20, color: '#fefcfc' },
        { x: 14, y: 20, color: '#2c2b2c' },
        { x: 15, y: 20, color: '#2c2b2c' },
        { x: 16, y: 20, color: '#10ff1c' },
        { x: 17, y: 20, color: '#10ff1c' },
        { x: 18, y: 20, color: '#2c2b2c' },

        { x: 1, y: 21, color: '#2c2b2c' },
        { x: 2, y: 21, color: '#fed1ad' },
        { x: 3, y: 21, color: '#2c2b2c' },
        { x: 4, y: 21, color: '#016f00' },
        { x: 5, y: 21, color: '#26b300' },
        { x: 6, y: 21, color: '#10ff1c' },
        { x: 7, y: 21, color: '#10ff1c' },
        { x: 8, y: 21, color: '#10ff1c' },
        { x: 9, y: 21, color: '#10ff1c' },
        { x: 10, y: 21, color: '#10ff1c' },
        { x: 11, y: 21, color: '#2c2b2c' },
        { x: 12, y: 21, color: '#fefcfc' },
        { x: 13, y: 21, color: '#fefcfc' },
        { x: 14, y: 21, color: '#fefcfc' },
        { x: 15, y: 21, color: '#2c2b2c' },
        { x: 16, y: 21, color: '#10ff1c' },
        { x: 17, y: 21, color: '#2c2b2c' },

        { x: 1, y: 22, color: '#2c2b2c' },
        { x: 2, y: 22, color: '#fed1ad' },
        { x: 3, y: 22, color: '#fefcfc' },
        { x: 4, y: 22, color: '#2c2b2c' },
        { x: 5, y: 22, color: '#016f00' },
        { x: 6, y: 22, color: '#26b300' },
        { x: 7, y: 22, color: '#26b300' },
        { x: 8, y: 22, color: '#26b300' },
        { x: 9, y: 22, color: '#2c2b2c' },
        { x: 10, y: 22, color: '#fefcfc' },
        { x: 11, y: 22, color: '#fefcfc' },
        { x: 12, y: 22, color: '#fed1ad' },
        { x: 13, y: 22, color: '#2c2b2c' },
        { x: 14, y: 22, color: '#2c2b2c' },
        { x: 15, y: 22, color: '#2c2b2c' },
        { x: 16, y: 22, color: '#2c2b2c' },
        { x: 17, y: 22, color: '#2c2b2c' },

        { x: 2, y: 23, color: '#2c2b2c' },
        { x: 3, y: 23, color: '#2c2b2c' },
        { x: 4, y: 23, color: '#2c2b2c' },
        { x: 5, y: 23, color: '#2c2b2c' },
        { x: 6, y: 23, color: '#2c2b2c' },
        { x: 7, y: 23, color: '#2c2b2c' },
        { x: 8, y: 23, color: '#2c2b2c' },
        { x: 9, y: 23, color: '#2c2b2c' },
        { x: 10, y: 23, color: '#fed1ad' },
        { x: 11, y: 23, color: '#fed1ad' },
        { x: 12, y: 23, color: '#fed1ad' },
        { x: 13, y: 23, color: '#ffba93' },
        { x: 14, y: 23, color: '#2c2b2c' },

        { x: 2, y: 24, color: '#2c2b2c' },
        { x: 3, y: 24, color: '#a33000' },
        { x: 4, y: 24, color: '#f65300' },
        { x: 5, y: 24, color: '#f99200' },
        { x: 6, y: 24, color: '#f99200' },
        { x: 7, y: 24, color: '#2c2b2c' },
        { x: 8, y: 24, color: '#ffba93' },
        { x: 9, y: 24, color: '#ffba93' },
        { x: 10, y: 24, color: '#2c2b2c' },
        { x: 11, y: 24, color: '#2c2b2c' },
        { x: 12, y: 24, color: '#2c2b2c' },

        { x: 2, y: 25, color: '#2c2b2c' },
        { x: 3, y: 25, color: '#a33000' },
        { x: 4, y: 25, color: '#f65300' },
        { x: 5, y: 25, color: '#f99200' },
        { x: 6, y: 25, color: '#f99200' },
        { x: 7, y: 25, color: '#2c2b2c' },
        { x: 8, y: 25, color: '#2c2b2c' },
        { x: 9, y: 25, color: '#2c2b2c' },
        { x: 10, y: 25, color: '#f99200' },
        { x: 11, y: 25, color: '#2c2b2c' },
        { x: 12, y: 25, color: '#2c2b2c' },
        { x: 13, y: 25, color: '#2c2b2c' },

        { x: 1, y: 26, color: '#2c2b2c' },
        { x: 2, y: 26, color: '#a33000' },
        { x: 3, y: 26, color: '#a33000' },
        { x: 4, y: 26, color: '#a33000' },
        { x: 5, y: 26, color: '#f65300' },
        { x: 6, y: 26, color: '#fefcfc' },
        { x: 7, y: 26, color: '#f99200' },
        { x: 8, y: 26, color: '#2c2b2c' },
        { x: 9, y: 26, color: '#a33000' },
        { x: 10, y: 26, color: '#f65300' },
        { x: 11, y: 26, color: '#f99200' },
        { x: 12, y: 26, color: '#f99200' },
        { x: 13, y: 26, color: '#fefcfc' },
        { x: 14, y: 26, color: '#2c2b2c' },

        { x: 1, y: 27, color: '#2c2b2c' },
        { x: 2, y: 27, color: '#a33000' },
        { x: 3, y: 27, color: '#a33000' },
        { x: 4, y: 27, color: '#f65300' },
        { x: 5, y: 27, color: '#f99200' },
        { x: 6, y: 27, color: '#f99200' },
        { x: 7, y: 27, color: '#f99200' },
        { x: 8, y: 27, color: '#2c2b2c' },
        { x: 9, y: 27, color: '#a33000' },
        { x: 10, y: 27, color: '#a33000' },
        { x: 11, y: 27, color: '#f65300' },
        { x: 12, y: 27, color: '#f65300' },
        { x: 13, y: 27, color: '#f99200' },
        { x: 14, y: 27, color: '#2c2b2c' },

        { x: 1, y: 28, color: '#2c2b2c' },
        { x: 2, y: 28, color: '#2c2b2c' },
        { x: 3, y: 28, color: '#2c2b2c' },
        { x: 4, y: 28, color: '#2c2b2c' },
        { x: 5, y: 28, color: '#2c2b2c' },
        { x: 6, y: 28, color: '#2c2b2c' },
        { x: 7, y: 28, color: '#2c2b2c' },
        { x: 8, y: 28, color: '#2c2b2c' },
        { x: 9, y: 28, color: '#2c2b2c' },
        { x: 10, y: 28, color: '#2c2b2c' },
        { x: 11, y: 28, color: '#2c2b2c' },
        { x: 12, y: 28, color: '#2c2b2c' },
        { x: 13, y: 28, color: '#2c2b2c' },
        { x: 14, y: 28, color: '#2c2b2c' }

    ],
}

let config = {
    width: 40,
    height: 40,
    color: 'white',
    drawing: true,
    eraser: false
}

let events = {
    mousedown: false
}

document.getElementById('pixel-art-area').style.width = `calc(${(0.825 * config.width)}rem + ${(config.height * 2)}px)`;
document.getElementById('pixel-art-area').style.height = `calc(${(0.825 * config.height)}rem + ${(config.width * 2)}px)`;
document.getElementById('pixel-art-options').style.width = `calc(${(0.825 * config.width)}rem + ${(config.height * 2)}px)`;

for(let i = 0; i < config.width; ++i) {
    for(let j = 0; j < config.height; ++j) {
        let createEl = document.createElement('div');
        createEl.classList.add('pixel');
        createEl.setAttribute('data-x-coordinate', j);
        createEl.setAttribute('data-y-coordinate', i);
        document.getElementById('pixel-art-area').appendChild(createEl);
    }
}

document.querySelectorAll('.pixel').forEach(function(item) {
    item.addEventListener('pointerdown', function(e) {
        if(config.eraser === true) {
            item.setAttribute('data-color', null);
            item.style.background = `#101532`;
        } else {
            item.setAttribute('data-color', config.color);
            item.style.background = `${config.color}`;
        }
        events.mousedown = true;
    });
});

document.getElementById('pixel-art-area').addEventListener('pointermove', function(e) {
    if(config.drawing === true && events.mousedown === true || config.eraser === true && events.mousedown === true) {
        if(e.target.matches('.pixel')) {
            if(config.eraser === true) {
                e.target.setAttribute('data-color', null);
                e.target.style.background = `#101532`;
            } else {
                e.target.setAttribute('data-color', config.color);
                e.target.style.background = `${config.color}`;
            }
        }
    }
});

document.body.addEventListener('pointerup', function(e) {
    events.mousedown = false;
});

[ 'click', 'input' ].forEach(function(item) {
    document.querySelector('.color-picker').addEventListener(item, function() {
        config.color = this.value;
        document.querySelectorAll('.colors > div').forEach(function(i) {
            i.classList.remove('current');
        });
        this.classList.add('current');
        config.eraser = false;
        document.querySelector('.eraser').classList.remove('current');
    });
});

document.querySelectorAll('.colors > div').forEach(function(item) {
    item.addEventListener('click', function(e) {
        document.querySelector('.color-picker').classList.remove('current');
        document.querySelectorAll('.colors > div').forEach(function(i) {
            i.classList.remove('current');
        })
        item.classList.add('current');
        config.eraser = false;
        config.color = `${item.getAttribute('data-color')}`;
        document.querySelector('.eraser').classList.remove('current');
    })
});

document.querySelector('.reset').addEventListener('click', function(e) {
    document.querySelectorAll('.pixel').forEach(function(item) {
        item.setAttribute('data-color', null)
        item.style.background = '#101532';
    });
});

document.querySelector('.prebuilt .prebuilt').addEventListener('click', function(e) {
    if(document.querySelector('.prebuilt .options').classList.contains('active')) {
        document.querySelector('.prebuilt .options').classList.remove('active');
    } else {
        document.querySelector('.prebuilt .options').classList.add('active');
    }
});

document.body.addEventListener('click', function(e) {
    if(!e.target.matches('.prebuilt.current')) {
        document.querySelector('.prebuilt .options').classList.remove('active');
    }
})

document.querySelectorAll('.options > .prebuilt').forEach(function(item) {
    item.addEventListener('pointerdown', function(e) {
        let getPrebuilt = item.getAttribute('data-prebuilt');
        document.querySelectorAll('.pixel').forEach(function(item) {
            item.setAttribute('data-color', null)
            item.style.background = '#101532';
        });
        if(typeof prebuilt[`${getPrebuilt}`] !== "undefined") {
            prebuilt[`${getPrebuilt}`].forEach(function(i) {
                let getPixel = document.querySelector(`.pixel[data-x-coordinate="${i.x}"][data-y-coordinate="${i.y}"]`);
                if(getPixel !== null) {
                    getPixel.setAttribute('data-color', i.color);
                    getPixel.style.background = i.color;
                }
            });
        }
    });
});

document.querySelector('.eraser').addEventListener('click', function(e) {
    document.querySelectorAll('.colors > div').forEach(function(i) {
            i.classList.remove('current');
    });
    if(this.classList.contains('current')) {
        this.classList.remove('current');
        document.querySelector('.color > div').classList.add('current');
        config.color = 'white';
        config.eraser = false;
    } else {
        this.classList.add('current');
        config.eraser = true;
    }
});

document.querySelector('.generate-css').addEventListener('click', function(e) {

    document.getElementById('popup-pixel-art').innerHTML = `
    <h2>Pixel Art Code</h2>
    <p>Copy the code below to use this on your webpage</p>
    <div class="close"><i class="fal fa-times"></i></div>`;
    
    let boxShadow = 
    `.pixelart {
        width: 1px;
        height: 1px;
        transform: scale(5);
        background: transparent;
        box-shadow: `;

    document.querySelectorAll('.pixel').forEach(function(item) {
        if(item.getAttribute('data-color') !== "null" && item.getAttribute('data-color') !== null) {
            let x = item.getAttribute('data-x-coordinate');
            let y = item.getAttribute('data-y-coordinate');
            let color = item.getAttribute('data-color');

            boxShadow += `${x}px ${y}px ${color}, `
        }
    });
    boxShadow = boxShadow.slice(0, -2);
    boxShadow = `${boxShadow};
}`

    let boxShadowCode = 
        `
&lt;<span class="token tag">div</span> <span class="token attr-name">class</span>="<span class="token attr-value">pixelart</span>">&lt;/<span class="token attr-name">div</span>>
&lt;<span class="token tag">style</span> <span class="token attr-name">type</span>="<span class="token attr-value">text/css</span>">
<span class="token selector">.pixelart</span> {
    <span class="token property">width</span>: <span class="token number">1</span>px;
    <span class="token property">height</span>: <span class="token number">1</span>px;
    <span class="token property">transform</span>: scale(<span class="token number">20</span>);
    <span class="token property">background</span>: transparent;
    <span class="token property">box-shadow</span>: `;

    document.querySelectorAll('.pixel').forEach(function(item) {
        if(item.getAttribute('data-color') !== "null" && item.getAttribute('data-color') !== null) {
            let x = item.getAttribute('data-x-coordinate');
            let y = item.getAttribute('data-y-coordinate');
            let color = item.getAttribute('data-color');

            boxShadowCode += `<span class="token number">${x}</span><span class="token unit">px</span> <span class="token number">${y}</span><span class="token unit">px</span> ${color}, `
        }
    });

    boxShadowCode = boxShadowCode.slice(0, -2);
    boxShadowCode = `${boxShadowCode};
}
&lt;/<span class="token tag">style</span>>`

    let newStyle = document.createElement('style');
    newStyle.innerHTML = boxShadow;
    document.body.append(newStyle);

    let newPixelArt = document.createElement('div');
    newPixelArt.classList.add('pixelart');
    document.getElementById('popup-pixel-art').append(newPixelArt);

    let newCodeBlock = document.createElement('pre');
    console.log(boxShadowCode);
    newCodeBlock.innerHTML = `<code>${boxShadowCode}</code>`;
    document.getElementById('popup-pixel-art').append(newCodeBlock);

    document.getElementById('popup-pixel-art').classList.add('active');
});

document.body.addEventListener('click', function(e) {
    console.log(e.target);
    if(!parent(e.target, '#popup-pixel-art', 1).matches('#popup-pixel-art') && !e.target.matches('#popup-pixel-art') && !e.target.matches('.generate-css')  && !e.target.matches('.generate-css-span') || parent(e.target, '.close', 1).matches('.close' || e.target.matches('.close')) ) {
        document.getElementById('popup-pixel-art').classList.remove('active');
    }
})

const parent = function(el, match, last) {
	var result = [];
	for (var p = el && el.parentElement; p; p = p.parentElement) {
		result.push(p);
		if(p.matches(match)) {
			break;
		}
	}
	if(last == 1) {
	    return result[result.length - 1];
	} else {
		return result;
	}
};

              
            
!
999px

Console