Skip to content

Commit

Permalink
All that usual project stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseppstein committed Aug 2, 2009
1 parent d84bf5f commit 55a337b
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
@@ -1 +1,2 @@
example/stylesheets
*.gem
50 changes: 50 additions & 0 deletions README.markdown
@@ -0,0 +1,50 @@
Compass Colors
==============

This compass extension provides support for working with colors in Sass and generating color themes for use on your website.

Installing
==========

sudo gem install chriseppstein-compass-colors


To install a theme into your existing compass project, add the following to your compass configuration file:

require 'compass-colors'

Then run this command:

compass -f colors -p <Theme Name>

The _theme.sass partial can then be imported into your stylesheets and the color constants can be used.

@import theme.sass

Supported Color Themes
======================

With all of these themes, you must pick a base color and the theme takes it from there:

* Basic/Monochromatic (basic)
* Complementary (complementary)
* Triadic (triadic)
* Split Complementary (split_complementary)
* Analogous (analogous)

Sass Functions Provided
=======================

* `lighten(color, percentage)` - Create a color lighter by the percent amount provided.
* `darken(color, percentage)` - Create a color darker by the percent amount provided.
* `saturate(color, percentage)` - Create a color lighter by the percent amount provided.
* `desaturate(color, percentage)` - Create a color lighter by the percent amount provided.
* `hue(color)` - Extract the hue from the color in degrees (0-360). Suitable to be passed as the first argument of hsl.
* `saturation(color)` - Extract the saturation from the color in percent (0-100). Suitable to be passed as the second argument of hsl.
* `luminosity(color)` - Extract the luminosity from the color in percent (0-100). Suitable to be passed as the third argument of hsl.
* `mix(color1, color2, percentage)` - Create a new color by mixing two colors together. Percentage (0-100) is optional, and indicates how
much of color2 should be mixed into color1.
* `grayscale(color)` - Create a gray color by mapping the color provided to the grayscale.
* `adjust_hue(color, degrees)` - Add the number of degrees provided to the hue of the color keeping luminosity and saturation constant.
Degrees can be negative.
* `complement(color)` - Returns the compliment of the color provided.
26 changes: 26 additions & 0 deletions Rakefile
@@ -0,0 +1,26 @@
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = "compass-colors"
gemspec.summary = "Color Support for Compass & Sass"
gemspec.email = "chris@eppsteins.net"
gemspec.homepage = "http://compass-style.org"
gemspec.description = "Sass Extensions and color theme templates to make working with colors easier and more maintainable."
gemspec.authors = ["Chris Eppstein"]
gemspec.has_rdoc = false
gemspec.add_dependency('chriseppstein-compass', '>= 0.10.0')
gemspec.files = []
gemspec.files << "README.markdown"
gemspec.files << "LICENSE.markdown"
gemspec.files << "VERSION.yml"
gemspec.files << "Rakefile"
gemspec.files += Dir.glob("example/**/*")
gemspec.files -= Dir.glob("example/**/*.css")
gemspec.files -= Dir.glob("example/*/extensions/**")
gemspec.files += Dir.glob("lib/**/*")
gemspec.files += Dir.glob("spec/**/*")
gemspec.files += Dir.glob("templates/**/*.*")
end
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end
2 changes: 1 addition & 1 deletion VERSION.yml
@@ -1,4 +1,4 @@
---
:minor: 0
:minor: 1
:patch: 0
:major: 0
58 changes: 58 additions & 0 deletions compass-colors.gemspec
@@ -0,0 +1,58 @@
# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
s.name = %q{compass-colors}
s.version = "0.1.0"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Chris Eppstein"]
s.date = %q{2009-08-02}
s.description = %q{Sass Extensions and color theme templates to make working with colors easier and more maintainable.}
s.email = %q{chris@eppsteins.net}
s.files = [
"Rakefile",
"VERSION.yml",
"example/config.rb",
"example/split_compliment_example.html",
"example/src/_split_compliment_theme.sass",
"example/src/screen.sass",
"lib/compass-colors.rb",
"lib/compass-colors/compass_extension.rb",
"lib/compass-colors/hsl.rb",
"lib/compass-colors/sass_extensions.rb",
"spec/approximate_color_matching.rb",
"spec/sass_extensions_spec.rb",
"templates/analogous/manifest.rb",
"templates/analogous/theme.sass",
"templates/basic/manifest.rb",
"templates/basic/theme.sass",
"templates/complementary/manifest.rb",
"templates/complementary/theme.sass",
"templates/split_complement/manifest.rb",
"templates/split_complement/theme.sass",
"templates/triadic/manifest.rb",
"templates/triadic/theme.sass"
]
s.homepage = %q{http://compass-style.org}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.3}
s.summary = %q{Color Support for Compass & Sass}
s.test_files = [
"spec/approximate_color_matching.rb",
"spec/sass_extensions_spec.rb"
]

if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3

if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<chriseppstein-compass>, [">= 0.10.0"])
else
s.add_dependency(%q<chriseppstein-compass>, [">= 0.10.0"])
end
else
s.add_dependency(%q<chriseppstein-compass>, [">= 0.10.0"])
end
end

0 comments on commit 55a337b

Please sign in to comment.