color-schemer 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/color-schemer.gemspec +24 -0
- data/lib/color-schemer.rb +9 -0
- data/stylesheets/_color-schemer.sass +79 -0
- metadata +80 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{color-schemer}
|
5
|
+
s.version = "0.1.0"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5")
|
8
|
+
s.authors = ["Scott Kellum", "Mason Wendell"]
|
9
|
+
s.date = %q{2011-10-06}
|
10
|
+
s.description = %q{Create color schemes with ease.}
|
11
|
+
s.email = %w{scott@scottkellum.com}
|
12
|
+
s.has_rdoc = false
|
13
|
+
s.files = [
|
14
|
+
"color-schemer.gemspec",
|
15
|
+
"lib/color-schemer.rb",
|
16
|
+
"stylesheets/_color-schemer.sass"
|
17
|
+
]
|
18
|
+
s.homepage = %q{https://github.com/scottkellum/color-schemer}
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
s.rubyforge_project = %q{color-schemer}
|
21
|
+
s.rubygems_version = %q{0.1.0}
|
22
|
+
s.summary = %q{Create color schemes with ease.}
|
23
|
+
s.add_dependency(%q<compass>, ["~> 0.11"])
|
24
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
// Define color schemes quickly
|
2
|
+
|
3
|
+
// Color schemes to choose from
|
4
|
+
// mono
|
5
|
+
// complement
|
6
|
+
// triad
|
7
|
+
// tetrad
|
8
|
+
// analogic
|
9
|
+
// accented-analogic
|
10
|
+
|
11
|
+
$color-location: primary !default
|
12
|
+
$base-color: #f00 !default
|
13
|
+
$color-scheme: mono !default
|
14
|
+
$hue-offset: 20 !default
|
15
|
+
$brightness-offset: 10% !default
|
16
|
+
|
17
|
+
// Normalizer credit to Mason Wendell: https://github.com/canarymason/The-Coding-Designers-Survival-Kit/blob/master/sass/partials/lib/variables/_color_schemes.sass
|
18
|
+
@function equalize($color)
|
19
|
+
@return hsl(hue($color), 100%, 50%)
|
20
|
+
|
21
|
+
@function color-schemer($color-location, $base-color, $color-scheme, $hue-offset)
|
22
|
+
// Primary, just return the base-color.
|
23
|
+
@if $color-location == primary
|
24
|
+
@return $base-color
|
25
|
+
// Secondary colors
|
26
|
+
@if $color-location == secondary
|
27
|
+
@if $color-scheme == mono
|
28
|
+
@return lighten($base-color, $brightness-offset)
|
29
|
+
@if $color-scheme == complement
|
30
|
+
@return invert($base-color)
|
31
|
+
@if $color-scheme == triad
|
32
|
+
@return adjust-hue(complement($base-color), $hue-offset)
|
33
|
+
@if $color-scheme == tetrad
|
34
|
+
@return complement($base-color)
|
35
|
+
@if $color-scheme == analogic
|
36
|
+
@return adjust-hue($base-color, $hue-offset)
|
37
|
+
@if $color-scheme == accented-analogic
|
38
|
+
@return adjust-hue($base-color, $hue-offset)
|
39
|
+
@warn "Oops! You didn’t properly define $color-scheme (complement, triad...)"
|
40
|
+
// Tertiary colors
|
41
|
+
@if $color-location == tertiary
|
42
|
+
@if $color-scheme == mono
|
43
|
+
@return lighten($base-color, $brightness-offset * 2)
|
44
|
+
@if $color-scheme == complement
|
45
|
+
@return lighten($base-color, $brightness-offset)
|
46
|
+
@if $color-scheme == triad
|
47
|
+
@return adjust-hue(complement($base-color), -$hue-offset)
|
48
|
+
@if $color-scheme == tetrad
|
49
|
+
@return adjust-hue($base-color, $hue-offset)
|
50
|
+
@if $color-scheme == analogic
|
51
|
+
@return adjust-hue($base-color, -$hue-offset)
|
52
|
+
@if $color-scheme == accented-analogic
|
53
|
+
@return adjust-hue($base-color, -$hue-offset)
|
54
|
+
@warn "Oops! You didn’t properly define $color-scheme (complement, triad...)"
|
55
|
+
// Quadrary colors
|
56
|
+
@if $color-location == quadrary
|
57
|
+
@if $color-scheme == mono
|
58
|
+
@return darken($base-color, $brightness-offset)
|
59
|
+
@if $color-scheme == complement
|
60
|
+
@return darken($base-color, $brightness-offset)
|
61
|
+
@if $color-scheme == triad
|
62
|
+
@return darken($base-color, $brightness-offset)
|
63
|
+
@if $color-scheme == tetrad
|
64
|
+
@return adjust-hue(complement($base-color), $hue-offset)
|
65
|
+
@if $color-scheme == analogic
|
66
|
+
@return darken($base-color, $brightness-offset)
|
67
|
+
@if $color-scheme == accented-analogic
|
68
|
+
@return complement($base-color)
|
69
|
+
@warn "Oops! You didn’t properly define $color-scheme (complement, triad...)"
|
70
|
+
@warn "Oops! You didn’t properly define $color-location (primary, secondary...)"
|
71
|
+
|
72
|
+
// Write your basic color scheme
|
73
|
+
$primary: color-schemer(primary) !default
|
74
|
+
$secondary: color-schemer(secondary) !default
|
75
|
+
$tertiary: color-schemer(tertiary) !default
|
76
|
+
$quadrary: color-schemer(quadrary) !default
|
77
|
+
|
78
|
+
// Tell other files that this is loaded.
|
79
|
+
$color-schemer-loaded: true
|
metadata
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: color-schemer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
version: 0.1.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Scott Kellum
|
13
|
+
- Mason Wendell
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-10-06 00:00:00 -04:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: compass
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ~>
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
- 11
|
31
|
+
version: "0.11"
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
description: Create color schemes with ease.
|
35
|
+
email:
|
36
|
+
- scott@scottkellum.com
|
37
|
+
executables: []
|
38
|
+
|
39
|
+
extensions: []
|
40
|
+
|
41
|
+
extra_rdoc_files: []
|
42
|
+
|
43
|
+
files:
|
44
|
+
- color-schemer.gemspec
|
45
|
+
- lib/color-schemer.rb
|
46
|
+
- stylesheets/_color-schemer.sass
|
47
|
+
has_rdoc: true
|
48
|
+
homepage: https://github.com/scottkellum/color-schemer
|
49
|
+
licenses: []
|
50
|
+
|
51
|
+
post_install_message:
|
52
|
+
rdoc_options: []
|
53
|
+
|
54
|
+
require_paths:
|
55
|
+
- lib
|
56
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
version: "0"
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
segments:
|
68
|
+
- 1
|
69
|
+
- 3
|
70
|
+
- 5
|
71
|
+
version: 1.3.5
|
72
|
+
requirements: []
|
73
|
+
|
74
|
+
rubyforge_project: color-schemer
|
75
|
+
rubygems_version: 1.3.6
|
76
|
+
signing_key:
|
77
|
+
specification_version: 3
|
78
|
+
summary: Create color schemes with ease.
|
79
|
+
test_files: []
|
80
|
+
|