Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create Complementary, Triad, and Monochromatic Color palette from single Hex Color

Tags:

javascript

php

What I'm trying to do is create three different color palettes from a single hex/rgb value supplied by a user. The palette will have the complement of the supplied color and then a full palette would be generated after. Ideally I'd be able to have a 5-color palette instead of just a single complementary color. I'll also be creating color palettes for triad, analagous, and monochromatic schemes.

I'm looking to figure out is how to actually create the complement color and then the color palette after. The same goes for the other palette types listed here. I'm open to doing this in Javascript or PHP.

like image 695
stwhite Avatar asked Oct 15 '13 18:10

stwhite


People also ask

How do you create a triad color scheme?

Triadic Combinations The colors in this composition are found equally spaced on the color wheel. Take an equilateral triangle and place it on the color wheel. The colors at each point come together to make the triadic combination.

How do you make a complementary color palette?

Complementary schemes are created by combining colors from opposite sides of the color wheel. In their most basic form, these schemes consist of only two colors, but can easily be expanded using tones, tints, and shades.

How do you make a monochromatic color palette?

Although mono does mean “one,” this approach to color isn't just using the same single shade in multiple places in your design. Instead, you can create a monochromatic color palette by choosing one base color (traditionally one of the 12 on the color wheel) plus any number of variations of that base.

What are monochromatic Colours and complementary Colours?

Monochromatic color schemes are comprised of tints, tones and shades of a single hue. Analogous color schemes are a group of 3 colors that are adjacent to each other on the color wheel. Complementary color schemes are made from 2 colors that are opposite each other on the color wheel.


1 Answers

I actually wrote a small script which can do much of this, colorflow.js.

Say your starting color was red (hex: #ff0000)

  1. Complementary color: colorflow.complement('#ff0000')
  2. Complementary color, palette of 5: colorflow.complement('#ff0000', 'double')
  3. Triadic: colorflow.triadic('#ff0000')
  4. Monochromatic: colorflow.rotational_dispersion('#c0c0c0', 5, 'saturation')

etc...

like image 116
SW4 Avatar answered Sep 28 '22 10:09

SW4