Giter VIP home page Giter VIP logo

color-me-sass's Introduction

ColorMeSass

Bitdeli Badge

Colour library for the css preprocessor Sass.

Full site with colours, variable names and documentation here.

Usage

###1. CSS Preprocessors

I'm not going to go into detail into what css preprocessors are or which one is better, both Sass and LESS are both pretty cool and I believe every web designer should at least have a play with one of them.

One thing you need to know if you're new to this, Sass uses Ruby and LESS uses JavaScript. That should help with your choice.

###2. Setting Up

Use npm install color-me-sass or bower install color-me-sass to get a copy of the package. Alternatively download a copy.

If your farmilliar with Sass or LESS this should be a walk in the park. Make sure the main _color-me-sass.scss file is imported at the very bottom so it will overwrite any similar colour variables you have.

###3. Using the Colours

Now here's the fun part. If you want to use a colour all you need to do is type in it's variable name.

body{
		background-color: $orangeDuller;
		color: $white;
	}

The cool thing about CSS pre-processors is you can make the colour lighter or darker, desaturate or saturate colours, change the hue, or even mix two colours together and it will calculate the correct hexadecimal value and place it in the compiled CSS. Pretty neat right.

Lightness

	/*  LIGHTEN  */		

	body{
		background-color: lighten($yellowDark, 25%);
	}

	/*  DARKEN  */

	body{
		background-color: darken($pinkCoral, 76%);
	}

Saturation

	/*  DESATURATE  */

	body{
		background-color: desaturate($amberDull, 14%);
	}

	/*  SATURATE  */

	body{
		background-color: saturate($greenSea, 39%);
	}

Hue

	body{
		background-color: adjust_hue($purplePlum, 78); /* between 0 - 360 */
	}

More than one adjustment

	/*  HS (HUE & SATURATION)  */

	body{
		background-color: adjust_color($brownBronze, $hue: 11%, $saturation: -8%);
	}

	/*  HSL (HUE, SATURATION & LIGHTNESS)  */

	body{
		background-color: adjust_color($blueLighter, $lightness: -10%, $hue: 11%, $saturation: -8%);
	}

Mixing Colours

	$cool_purple:  mix($red, $blue, 50%);

	body{
		background-color: $cool_purple;
	}

The possibilities are pretty much endless. Have fun. Don't forget to hit me up on twitter if you end up using this for a site you work on.

Liscense

Color Me Sass is licensed under the ☺ license.

You, the licensee, are hereby granted free usage in both personal and commerical environments, without any obligation of attribution or payment (monetary or otherwise). The licensee is free to use, copy, modify, publish, distribute, sublicence, and/or merchandise the work, subject to the licensee inflecting a positive message unto someone. This includes (but is not limited to): smiling, being nice, saying “thank you”, assisting other persons, or any similar actions percolating the given concept.

The above copyright notice serves as a permissions notice also, and may optionally be included in copies or portions of the work.

The work is provided “as is”, without warranty or support, express or implied. The author(s) are not liable for any damages, misuse, or other claim, whether from or as a consequence of usage of the given work.

Changelog

v 1.0 Color Me Sass is born.

v 1.1 Added a few brand colours from http://brandcolors.net/ to the library

v 1.2 25/04/13 Added some colours from preboot

v 1.3 04/06/13 Updated with over 90 dulux inspired colours

v 1.4 03/03/16 Added support for NPM packaging.

color-me-sass's People

Contributors

ahmednadar avatar bluesaunders avatar cwspear avatar grantcarthew avatar silvenon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

color-me-sass's Issues

Adjust multiple parameters for a color.

The docs show an example for making multiple adjustments to a single color, but it's quite verbose:

body {
  background-color: adjust_hue(desaturate($brownBronze, 8), 11)
}

The better way is to use the adjust-color function and pass the proper adjustments, as such:

body {
  background-color: adjust_color($brownBronze, $hue: 11%, $saturation: -8%);
}

Read more about adjust-color

Brand Colors Redundant

Hey Richard,

I just found Brand Colors which supports both Bower and NPM. You could clear out the brand colors you added as it is redundant.

Just a suggestion.

Regards.

Make it submodule-friendly

It would be nice if there was a nice way to include the project as a submodule. I suggest seperating documentation into a new branch (commonly named gh-pages, if you're using GitHub Pages), then having the master branch structured something like this:

colors
  _ambers.scss
  _blues.scss
  _bootstrap.scss
  ...
color-me-sass.scss

color-me-sass.scss is just ColorMeSass.scss renamed to follow the naming conventions.

The benefits of including submodules is that you can update them easily. For example, this way if you update something, I wouldn't really know if I don't remember the exact time I downloaded the previous version.

EDIT: I can make a pull request, you just have to tell me how you're hosting you're site and other info you think I should know.

No "Blacks" color group

Maybe not an issue for you or others, but I noticed that you had "Whites" as a color group.

You could add a "Blacks" color group as well to balance the concept of Black vs. White.
#000 to #999 and #aaa to #eee would do I think.

Great color library, thanks for creating it.

Add NCS base colors

The Natural Color System has some unique definitions for its base colors.

Color Name Hex Value Closest existing color in CMS Color distance
Red #c40233 $redPinterest (#c8232c) - too orange 8.7
Yellow #ffd300 $yellowGold (#ffd700) 2.37
Green #009f6b $greenSpa (#00aa8f) - too bright 15.3
Blue #0087bd $blueRdio (#008fd5) - too bright 9.78

As you can see, CMS already has a color close enough to NCS Yellow, so if you want to just stick with that, it would work fine. But CMS doesn't have a green that's very close to NCS Green, and CMS's closest red and blue are only semi-close.

So if you add some or all of these, I would propose that they each be named ${color}Natural.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.