SlideShare a Scribd company logo
Make color schemes a no-brainer with Sass - Patrick Baselier
Make color schemes a no brainer with sass
Make color schemes a no brainer with sass
Make color schemes a no brainer with sass
Make color schemes a no brainer with sass
Make color schemes a no brainer with sass
Color schemes and Sass
Make color schemes a no brainer with sass
Make color schemes a no brainer with sass
#FF8800
hsl(32, 100%, 50%)
rgb(255, 136, 0)
#206676
hsl(191, 57%, 29%)
rgb(32, 102, 118)
Make color schemes a no brainer with sass
Monochromatic
COMPLEMENTARY
Triad
Tetrad
Analogic
Accented Analogic
Make color schemes a no brainer with sass
CSS
Sass
CSS
Sass
CSS
Sass
Sass
CSS
Sass
CSS
Sass
CSS
#FF0000
#CC3333
#FF7575
#A80000
Hex
R G B
255, 0, 0 0, 255, 0 0, 0, 255
255, 255, 255
255, 255, 0
255, 127, 0
R
255, 0, 0
R
255, 0, 0
R
127, 0, 0
R
63, 0, 0
255, 127, 127
#FF0000
#CC3333
#FF7575
#A80000
Hex
255, 0, 0
204, 51, 51
255, 117, 117
168, 0, 0
RGB
Color, tints and shades
• Pick as base color

(e.g. rgb(255, 0, 0))
• Decrease value of base color to create shades

(e.g. rgb(127, 0, 0))
• Increase value of other colors equivalently to create
tints

(e.g. rgb(255, 127, 127))
Color, tints and shades
• Not so easy when base color is a combination of RGB

(e.g. rgb(0, 119, 255))
• Meet hsl()
HSL
• Hue
• 0o ≤ Hue ≤ 360o
• Saturation
• The colorfulness of a color relative to its own brightness
• 0% ≤ Saturation ≤ 100%
• Lightness
• The light/darkness of a color from white to black
• 0% ≤ Lightness ≤ 100%
0o
240o
120o
#FF0000
#CC3333
#FF7575
#A80000
Hex
255, 0, 0
204, 51, 51
255, 117, 117
168, 0, 0
RGB
0, 100, 50
0, 60, 50
0, 100, 73
0, 100, 33
HSL
Color, tints and shades
• Pick as base color

(e.g. hsl(0, 100%, 50%))
• Change saturation to move to grey

(e.g. hsl(0, 60%, 50%))
• Change lightness to lighten or darken the color

(e.g. hsl(0, 100%, 73%) or hsl(0, 100%, 33%))
hsl(0, 100%, 50%)
hsl(0, 60%, 50%)
hsl(0, 100%, 73%)
hsl(0, 100%, 33%)
hsl(212, 100%, 50%)
hsl(212, 60%, 50%)
hsl(212, 100%, 73%)
hsl(212, 100%, 33%)
$h: 0;
$s: 100%;
$l: 50%;
$base-color: hsl($h, $s, $l);
.base-color {
background: $base-color;
}
.variant-1 {
background: scale-color($base-color, $saturation: -40%);
}
.variant-2 {
background: scale-color($base-color, $lightness: 23%);
}
.variant-3 {
background: scale-color($base-color, $lightness: -17%);
}
Sass
$h: 212;
$s: 100%;
$l: 50%;
$base-color: hsl($h, $s, $l);
.base-color {
background: $base-color;
}
.variant-1 {
background: scale-color($base-color, $saturation: -40%);
}
.variant-2 {
background: scale-color($base-color, $lightness: 23%);
}
.variant-3 {
background: scale-color($base-color, $lightness: -17%);
}
Sass
Base color

(e.g. hsl(0, 50%, 100%)
Complement color

(e.g. hsl(180, 50%, 100%)
Complementary
$h: 0;
$s: 100%;
$l: 50%;
$base-color: hsl($h, $s, $l);
$compl-color: complement($base-color);
.compl-0 {
background: $compl-color;
}
.compl-1 {
background: scale-color($compl-color, $saturation: -40%);
}
.compl-2 {
...
}
Sass
Base color

(e.g. hsl(0, 50%, 100%)
Secondary 2

(e.g. hsl(210, 50%, 100%)
180o-α
α
Secondary 1

(e.g. hsl(150, 50%, 100%)
Triad
Base color

(e.g. hsl(0, 50%, 100%)
Secondary 1

(e.g. hsl(30, 50%, 100%)
α
Secondary 2

(e.g. hsl(210, 50%, 100%)
Tetrad
Complement color

(e.g. hsl(180, 50%, 100%)
Base color

(e.g. hsl(0, 50%, 100%)
Secondary 1

(e.g. hsl(30, 50%, 100%)
α
Secondary 2

(e.g. hsl(330, 50%, 100%)
Analogic
Base color

(e.g. hsl(0, 50%, 100%)
Secondary 1

(e.g. hsl(30, 50%, 100%)
α
Secondary 2

(e.g. hsl(330, 50%, 100%)
Accented Analogic
Complement color

(e.g. hsl(180, 50%, 100%)
Demo
RGB RYB
Demo
Make color schemes a no brainer with sass
github.com/bazzel/sass-color-schemes
Thank you

More Related Content

PPTX
Searching Images by Color Using Solr
Chris Becker
 
PDF
Searching Images by Color: Presented by Chris Becker, Shutterstock
Lucidworks
 
PPTX
Ncda 2014 priorities
Carmen Zubiaga
 
PDF
Java Project 2013- 2014 TITLES
eccube
 
PPSX
2014 Celebrations Around the World
maditabalnco
 
PDF
Colour
Ankit Dubey
 
PDF
Css ejemplos y codigo 1
FREDY GÓMEZ
 
Searching Images by Color Using Solr
Chris Becker
 
Searching Images by Color: Presented by Chris Becker, Shutterstock
Lucidworks
 
Ncda 2014 priorities
Carmen Zubiaga
 
Java Project 2013- 2014 TITLES
eccube
 
2014 Celebrations Around the World
maditabalnco
 
Colour
Ankit Dubey
 
Css ejemplos y codigo 1
FREDY GÓMEZ
 

More from nextbuild (13)

PDF
Aws microservice keynote
nextbuild
 
PDF
How invariants help writing loops
nextbuild
 
PDF
A first taste of integration with Apache Camel
nextbuild
 
PDF
Effective code reviews
nextbuild
 
PDF
Microservices in the real world
nextbuild
 
PDF
Asp.net in a new world
nextbuild
 
PDF
Meteor - building an email client
nextbuild
 
PDF
Swimming upstream in the container revolution
nextbuild
 
PPTX
Event sourcing your AngularJS applications
nextbuild
 
PDF
Cqrs from the trenches
nextbuild
 
PPTX
Architecting for the cloud
nextbuild
 
PDF
Finally… reliable software!
nextbuild
 
PDF
Cucumber spec - a tool takes your bdd to the next level
nextbuild
 
Aws microservice keynote
nextbuild
 
How invariants help writing loops
nextbuild
 
A first taste of integration with Apache Camel
nextbuild
 
Effective code reviews
nextbuild
 
Microservices in the real world
nextbuild
 
Asp.net in a new world
nextbuild
 
Meteor - building an email client
nextbuild
 
Swimming upstream in the container revolution
nextbuild
 
Event sourcing your AngularJS applications
nextbuild
 
Cqrs from the trenches
nextbuild
 
Architecting for the cloud
nextbuild
 
Finally… reliable software!
nextbuild
 
Cucumber spec - a tool takes your bdd to the next level
nextbuild
 
Ad

Recently uploaded (20)

PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Doc9.....................................
SofiaCollazos
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Ad

Make color schemes a no brainer with sass