• Stars
    star
    136
  • Rank 267,670 (Top 6 %)
  • Language
    CSS
  • Created about 12 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Colour library for the css preprocessor SASS

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.

More Repositories

1

no-redux

βš›οΈ 🎣 Experimenting with using hooks and context instead of Redux
JavaScript
78
star
2

muffin

🧁 A design focused front-end web development template using SASS and Jekyll.
SCSS
66
star
3

pdf_sign

πŸ–‹ Using node-signpdf and pdf-lib.js to sign a pdf
JavaScript
39
star
4

banana-chocolate-chip

Front-end framework for modern web apps powered by gulp, based on muffin.
CSS
13
star
5

episode-picker-ts

πŸ“Ί Rick and Morty episode picker for Udemy course
TypeScript
8
star
6

pinpoint.js

jQuery address/place locater plugin using Google Maps
JavaScript
8
star
7

gulp-to-webpack

JavaScript
6
star
8

todo-list-api

Creating a basic REST api with Tornado
Python
6
star
9

pdf_verify

PDF signature verification using nodejs
JavaScript
5
star
10

simple-react-comp-library

TypeScript
5
star
11

haxe-flixel-template

HaxeFlixel game starter powered by Lix and Node.js
Haxe
5
star
12

Scales-A-Pangolin-Story

First game in Haxe and HaxFlixel
Haxe
4
star
13

hf-site

Rebuild of Haxeflixel.com using React, Next.js and Typescript
TypeScript
4
star
14

todo-app-angular

Simple todo app built with Angular 2 based off https://www.sitepoint.com/angular-2-tutorial/
TypeScript
3
star
15

game-off-2021

🦟🐜 Entry for Github game off 2021
Haxe
2
star
16

serverless_demo_app

JavaScript
2
star
17

trimm-api-node

πŸ’΄ New api for Trimm built-in node and typescript
TypeScript
2
star
18

hf-video-demo

Haxe
2
star
19

Kevin-and-Maisey

🐒🐞 Game entry for the #AutisticaPlayJam: A 2D point and click game where you help an autistic turtle get through his day.
Haxe
2
star
20

yeti-project

β„οΈπŸ˜ˆ Stealth puzzle game about a Yeti that has to try to not get spotted
Haxe
1
star
21

hf-multiplayer

HaxeFlixel game with online multiplayer powered by Colyseus
JavaScript
1
star
22

serverless-stack-api

testing serverless framework
JavaScript
1
star
23

pong-amethyst

A simple project I'm using to learn the Rust programming language
Rust
1
star
24

react-vite-course

Modern React coujrse
CSS
1
star
25

hf-scripts

Scripts used in my unofficial HaxeFlixel template.
JavaScript
1
star
26

RichardBray

😬 Adding some spice to my gh profile
1
star
27

echo-tut

Echo tutorial for haxeflixel
Haxe
1
star
28

trimm-client

frontend part of Trimm
TypeScript
1
star
29

personal-site

HTML
1
star