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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                .wrapper
  .color-wheel
    .default-colors
      ul
        each i in new Array(12)
          li  
    .lighten-colors
      ul
        each i in new Array(12)
          li   
    .darken-colors
      ul
        each i in new Array(12)
          li 
  .protractor
    ul
      each i in new Array(360)
        li         
        
.color-palletes        
  .complementary-colors
     h1 Complementary Colors
     ul
        li   
  .split-complementary-colors
     h1 Split Complementary Colors
     ul
        each i in new Array(2)
          li   
  .analogous-colors
     h1 Analogous Colors
     ul
        each i in new Array(3)
          li 
  .triadic-colors
     h1 Triadic Colors
     ul
        each i in new Array(2)
          li 
  .square-colors
     h1 Square Colors
     ul
        each i in new Array(3)
          li             
              
            
!

CSS

              
                
$main-color: #4eb3cc; // #4ecc66 // #cccb4e // #cc4ea3 
$angle : 30;
$how-dark: 25%;
$how-light: 25%;
$background-color: #282828;

body {
  background-color: $background-color;
  text-align: center;
  font-family: "Helvetica", sans-serif;
}

//=========== Protractor ============//
.protractor {
  background: $background-color;
  height: 190px;
  left: 115px;
  list-style: none;
  position: absolute;
  top: 103px;
  width: 190px;
  z-index: 0;
  ul li {
    border-left: 140px solid transparent;
    border-top: 1px solid #555;
    color: #fff;
    font-size: 10px;
    height: 0;
    left: 50%;
    list-style: none;
    position: absolute;
    top: 50%;
    transform-origin: 0 0;
    &:nth-of-type(6):after, &:nth-of-type(12):after, &:nth-of-type(18):after, &:nth-of-type(24):after {
      font-size: 14px;
      font-weight: bold;
      margin-left: 20px;
    }
  }
  @for $i from 1 through 24 {
    $new-angle: 15*$i;
    ul li:nth-of-type(#{$i}){   
      transform: rotate(#{$new-angle}deg);
      &:after {
        content: "#{$new-angle}°";
      }
    }
  }
}


//=========== Color Wheel ===========//
.color-wheel{
  left: 22px;
  position: relative;
  top: 65px;
  div {
    background: $background-color;
    border-radius: 50%;
    border: 5px solid $background-color;
    overflow: hidden;
    position: absolute;
    transform: rotate(-15deg);
  }
}
.darken-colors{
  height: 250px;
  left: 50px;
  top: 0px;
  width: 250px;
  z-index: 1;
}
.default-colors{
  height: 170px;
  left: 90px;
  top: 40px;
  width: 170px;
  z-index: 2;
}
.lighten-colors {
  height: 100px;
  left: 125px;
  top: 75px;
  width: 100px;
  z-index: 3;
    &:after {
    background: $background-color;
    border-radius: 250px;
    content: " ";
    height: 50px;
    left: 25px;
    position: absolute;
    top: 25px;
    width: 50px;
  }
}

.color-wheel {
    @for $i from 1 through 12 {
    $new-angle:$angle*$i;
    $new-color:adjust-hue($main-color,$new-angle);
     ul li:nth-of-type(#{$i}){
      border-left: 1000px solid transparent;
      border-top: 560px solid  $new-color;
      left: 50%;
      list-style: none;
      position: absolute;
      top: 50%;
      transform-origin: 0 0;
      transform: rotate(#{$new-angle}deg);
    }
    .default-colors li:nth-of-type(#{$i}){
      border-top-color: $new-color;
    }
    .darken-colors li:nth-of-type(#{$i}){
      border-top-color: darken($new-color, $how-dark);
    }
    .lighten-colors li:nth-of-type(#{$i}){
      border-top-color: lighten($new-color, $how-light);
    }
  }
}

//=========== Color palletes ===========//

.color-palletes {
  background: #000;
  color: #fff;
  margin-left: 400px;
  h1 {
    border-bottom: 30px solid $main-color;
    display: block;
    font-size: 14px;
    font-weight: normal;
    margin: 0px;
    padding: 10px;
  }
  div {
    background: darken($background-color, 5%);
    float: left;
    margin: 10px;
    padding: 10px;
    width: 200px;
  }
  ul {
    float: left;
    list-style: none inside;
    margin: 0px;
    padding: 0px;
    li {
      height: 30px;
      margin-top: 5px;
      width: 200px;
    }
  }
}
.complementary-colors {
  @for $i from 1 through 2 {
    $new-angle: 180*$i;
    $new-color:adjust-hue($main-color,$new-angle);
    ul li:nth-of-type(#{$i}){
      background: $new-color;
    }
  }
}

.analogous-colors {
  @for $i from 1 through 3 {
    $new-angle: 30*$i;
    $new-color:adjust-hue($main-color,$new-angle);
    ul li:nth-of-type(#{$i}){
      background: $new-color;
    }
  }
}

.triadic-colors {
  @for $i from 1 through 2 {
    $new-angle: 120*$i;
    $new-color:adjust-hue($main-color,$new-angle);
    ul li:nth-of-type(#{$i}){
      background: $new-color;
    }
  }
}

.square-colors {
  @for $i from 1 through 3 {
    $new-angle: 90*$i;
    $new-color:adjust-hue($main-color,$new-angle);
    ul li:nth-of-type(#{$i}){
      background: $new-color;
    }
  }
}

.split-complementary-colors {
  $new-color: adjust-hue($main-color, 150deg);
  ul {
    li:nth-of-type(1){
      background: $new-color;
    }
    li:nth-of-type(2){
      background: adjust-hue($new-color, 60deg);
    }

  }
}


.wrapper {
  transform:  translateY(100px);
  
  .color-wheel {
    margin-left: 10px;
    margin-top: 50px;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console