Smarter defaults for colors on the web.

Related tags

Color colors
Overview

colors.css 3.0.0

Better default colors for the web. A collection of skin classes for faster prototyping and nicer looking sites.

Stats

903 85 85
bytes selectors declarations

Installation

With npm

npm install --save-dev colors.css

With Git

git clone https://github.com/tachyons-css/colors.css

Usage

Using with PostCSS

Import the css module

@import "colors.css";

Then process the CSS using the tachyons-cli

$ npm i -g tachyons-cli
$ tachyons-cli path/to/css-file.css > dist/t.css

Using the CSS

The built CSS is located in the css directory. It contains an unminified and minified version. You can either cut and paste that css or link to it directly in your html.

<link rel="stylesheet" href="path/to/module/css/colors.css">

Development

The source CSS files can be found in the src directory. Running $ npm start will process the source CSS and place the built CSS in the css directory.

The CSS

/*

  COLORS
  Better default colors for the web

*/
/* 

   VARIABLES

   - Cool
   - Warm
   - Gray Scale

*/
/*

   SKINS
   - Backgrounds
   - Colors
   - Border colors
   - SVG fills
   - SVG Strokes

*/
/* Backgrounds */
.bg-navy { background-color: #001F3F; }
.bg-blue { background-color: #0074D9; }
.bg-aqua { background-color: #7FDBFF; }
.bg-teal { background-color: #39CCCC; }
.bg-olive { background-color: #3D9970; }
.bg-green { background-color: #2ECC40; }
.bg-lime { background-color: #01FF70; }
.bg-yellow { background-color: #FFDC00; }
.bg-orange { background-color: #FF851B; }
.bg-red { background-color: #FF4136; }
.bg-fuchsia { background-color: #F012BE; }
.bg-purple { background-color: #B10DC9; }
.bg-maroon { background-color: #85144B; }
.bg-white { background-color: #FFFFFF; }
.bg-gray { background-color: #AAAAAA; }
.bg-silver { background-color: #DDDDDD; }
.bg-black { background-color: #111111; }
/* Colors */
.navy { color: #001F3F; }
.blue { color: #0074D9; }
.aqua { color: #7FDBFF; }
.teal { color: #39CCCC; }
.olive { color: #3D9970; }
.green { color: #2ECC40; }
.lime { color: #01FF70; }
.yellow { color: #FFDC00; }
.orange { color: #FF851B; }
.red { color: #FF4136; }
.fuchsia { color: #F012BE; }
.purple { color: #B10DC9; }
.maroon { color: #85144B; }
.white { color: #FFFFFF; }
.silver { color: #DDDDDD; }
.gray { color: #AAAAAA; }
.black { color: #111111; }
/* Border colors 

   Use with another border utility that sets border-width and style 
   i.e .border { border-width: 1px); border-style: solid); }     
*/
.border--navy { border-color: #001F3F; }
.border--blue { border-color: #0074D9; }
.border--aqua { border-color: #7FDBFF; }
.border--teal { border-color: #39CCCC; }
.border--olive { border-color: #3D9970; }
.border--green { border-color: #2ECC40; }
.border--lime { border-color: #01FF70; }
.border--yellow { border-color: #FFDC00; }
.border--orange { border-color: #FF851B; }
.border--red { border-color: #FF4136; }
.border--fuchsia { border-color: #F012BE; }
.border--purple { border-color: #B10DC9; }
.border--maroon { border-color: #85144B; }
.border--white { border-color: #FFFFFF; }
.border--gray { border-color: #AAAAAA; }
.border--silver { border-color: #DDDDDD; }
.border--black { border-color: #111111; }
/* Fills for SVG */
.fill-navy { fill: #001F3F; }
.fill-blue { fill: #0074D9; }
.fill-aqua { fill: #7FDBFF; }
.fill-teal { fill: #39CCCC; }
.fill-olive { fill: #3D9970; }
.fill-green { fill: #2ECC40; }
.fill-lime { fill: #01FF70; }
.fill-yellow { fill: #FFDC00; }
.fill-orange { fill: #FF851B; }
.fill-red { fill: #FF4136; }
.fill-fuchsia { fill: #F012BE; }
.fill-purple { fill: #B10DC9; }
.fill-maroon { fill: #85144B; }
.fill-white { fill: #FFFFFF; }
.fill-gray { fill: #AAAAAA; }
.fill-silver { fill: #DDDDDD; }
.fill-black { fill: #111111; }
/* Strokes for SVG */
.stroke-navy { stroke: #001F3F; }
.stroke-blue { stroke: #0074D9; }
.stroke-aqua { stroke: #7FDBFF; }
.stroke-teal { stroke: #39CCCC; }
.stroke-olive { stroke: #3D9970; }
.stroke-green { stroke: #2ECC40; }
.stroke-lime { stroke: #01FF70; }
.stroke-yellow { stroke: #FFDC00; }
.stroke-orange { stroke: #FF851B; }
.stroke-red { stroke: #FF4136; }
.stroke-fuchsia { stroke: #F012BE; }
.stroke-purple { stroke: #B10DC9; }
.stroke-maroon { stroke: #85144B; }
.stroke-white { stroke: #FFFFFF; }
.stroke-gray { stroke: #AAAAAA; }
.stroke-silver { stroke: #DDDDDD; }
.stroke-black { stroke: #111111; }

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Authors

License

MIT

Comments
  • Added CoffeeScript + Javascript versions

    Added CoffeeScript + Javascript versions

    Great project!

    I've been using these as the backing-data for a color selection palette in an Angular app, so I thought I'd save people the headache of converting the CSS / LESS / SASS to usable JSON.

    Added a Coffeescript + VanillaJS version.

    Hopefully useful to others.

    D.

    opened by dylan-baskind 8
  • Add CSS variables (custom properties)

    Add CSS variables (custom properties)

    Hey, Instead of using classes, it will be better to use CSS variables, like so:

    :root{
         var-bg-aqua:  #7FDBFF;
         var-bg-blue:  #0074D9;
    }
    

    Maybe it will be cool to add for progressive enhancement ?

    opened by iamvdo 7
  • Maroon resembles dark purple

    Maroon resembles dark purple

    I was looking at your project and saw that the brown color you use - 85144b (HSV: 331°, 85%, 52%) - is mapped to a color that resembles much more to dark purple. Following the specification of maroon color in HSV (0°, 100%, 50%), I choose a new color that is more like the brown color of the specification and it is not as heavy.

    The color in question is 731e11 (HSV: 8°, 85%, 45%) and it have a hue tending to yellow, while it maintains the saturation and value near the originally proposed by your project. I believe this color would fit better in the color pattern of maroon.

    Any questions, I'm open to discussion.

    opened by vndmtrx 6
  • the more obscure color codes

    the more obscure color codes

    i love love love this! i was wondering if you had thoughts, or references, about creating a nicer palate around the rest of the ~130 colors, e.g. khaki, lightgray, salmon. i'm working on a graphing library and would love for users to be able to drop human-readable color IDs with nicer colors :)

    opened by chriddyp 5
  • Switch from a Halloween footer to a winter theme

    Switch from a Halloween footer to a winter theme

    Thought you might be interested in changing seasons :smile_cat:

    • Made the footer background white to represent snow and winter.
    • Now using olive links, buttons, and tagline to represent evergreen trees.
    • Author related links are changed to gray for a more winter-y feel, as well.

    v6tupmu7wikrax8vk9rbbe9lcbl369pmmwcmmguc6ko

    opened by johno 5
  • Additional color schemes/spaces

    Additional color schemes/spaces

    Now there are just HEX codes. It would be nice if the website would also provide the RGB and HSL values :) Sometimes I just visit the page and copy a few color codes. And given that IE8 is beginning to fade away I prefer the HSL scheme/space.

    opened by scherii 5
  • Use gulp-load-plugins to automatically require gulp plugins

    Use gulp-load-plugins to automatically require gulp plugins

    gulp-load-plugins automatically requires gulp plugins specified in package.json. That makes it easier to add and remove plugins in the future. For further information on gulp-load-plugins see: https://www.npmjs.org/package/gulp-load-plugins

    opened by juliangrosshauser 4
  • Node.js `require('colors.css')` should return `colors` from `js/colors.js`

    Node.js `require('colors.css')` should return `colors` from `js/colors.js`

    Currently the code require('colors.css') is meaningless in Node.js and similar environments (such as Browserify or node-webkit) though they might utilize the npm package colors.css.

    This pull request detects Node.js module.exports and uses it to return the colors object from js/colors.js whenever the code require('colors.css') is used.

    opened by Mithgol 4
  • Objectives

    Objectives

    I'd like to help out and develop this because I think it is awesome, but I couldn't find a list of Todo's or any info on contributing. Do you think you could outline some things you would like to add so we can help out?

    opened by ilanbiala 4
  • Improved LESS version.

    Improved LESS version.

    Just thought I'd add my $0.02 to the awesomeness:

    • Added a couple of mixins which allow for getting rid of code duplication.
    • Applied -moz-transition as well to links.
    • Fixed mixed casing on colors.
    • Removed useless _ from filenames (it's a SASS convention, not a LESS one :-)).
    opened by ghost 4
  • Create preset color combinations

    Create preset color combinations

    I was looking at the CSS files and I was thinking about creating a CSS file that would have presets. This would just mean that there would be multiple preset classes where there would be one particular background color (such as navy, white, blue, red etc) then the font, border, strokes, fills colors would just be another color.

    The combinations could be utilized from the colorable website provided in your website, let me know what you think!

    opened by jacolin-web 3
  • adding best color to suit the smarter defaults

    adding best color to suit the smarter defaults

    I loved the idea of using e.g. #80BFFF text color for #001F3F background. So I converted your websites hsla colors to hex and used them as variables. NOTE: I had not build this repo,

    opened by mrahimygk 0
  • More useful colors, Bootstrap convention and compatibility

    More useful colors, Bootstrap convention and compatibility

    Hi.

    I am very happy to use this repo during recent months and I really thank you for that. I usually tend to use CDN links but at the same time I like to have more options in terms of customisation. Therefore, I was wondering if I could be contributing to this repo and then have a better customised CDN. These are my changes to the repo and I hope they will be ok.

    • Beautiful colors are added from "persian" family.

    • Some branding colors (facebook, ...) are added since they are widely seen by the users and present a sense of intimacy. These new colors also bring simplicity in UI design. Blue variation has been point of concern as it is regarded as peaceful, tranquil, secure, and orderly.

    • Since this css will be probably used as a complementary color palette to Bootstrap framework (as I usually do), some css classes have been renamed to be consistent with bootstrap conventions introducing more integrity in coding (.{color} -> .text-{color} & .border--{color} -> .border-{color}).

    • As this css color palette can be used individually, bootstrap colors (primary, secondary , ...) are also introduced providing a wide range of options in hand.

    • "!important" declaration is added to provide specificity.

    Feel free to edit in case of need.

    Regards Meysam Majnooni

    opened by majnooni 0
  • Added contrasts exampled in website

    Added contrasts exampled in website

    I enjoyed the contrast colors available in the project page, so I variablized them and added new classes (bg-{color}-fg and fg-{color}-bg) to implement both the original colors and their appropriate contrast color.

    opened by tbm0115 0
  • LESS implementation of colors

    LESS implementation of colors

    As a supplement to the colors utility, a LESS implementation that simplifies creating multiple classes. It also includes a gulp file to compile and minify the files accordingly.

    opened by srivatsshankar 0
Releases(3.0.0)
  • 3.0.0(Dec 26, 2015)

    giphy-2

    Postcss is the future. In the spirit of the year coming to a close, I'm updating this project to represent what is to come in the world of front-end development.

    The project is less monolithic now. Before - the main repo contained all of the pre-processor partials along with a complicated gulpfile. Now the main build system is just using posts and everything runs with a simple npm start. There are dedicated modules for sass, less, and stylus. Myth has been deprecated.

    The repo is a lot more simple now. Simple takes time and thought. But I think it's better.

    Happy Holidays.

    Source code(tar.gz)
    Source code(zip)
  • v2.2.0(Feb 25, 2015)

  • 2.0.0(Jul 8, 2014)

    colors

    What could possibly have updated

    New classes for setting border colors on html elements, as well as fills and strokes on svg elements. As I’ve been working a lot with inline svg lately - I’ve been thirsting for the ability to apply color classes to svg elements instead of looking up hex codes and editing the fill value every time I want to change something. Ive been using similar border-color utilities in my tachyons project and thought they’d be useful and appropriate here as well. Also edited the dev workflow that was previously set up with gulp. New plugins and tasks are available.

    Stats

    Even with the additions of border-color, fill and stroke, colors.css remains a small css module that won’t add bloat to your existing css.

    colors.css        888b (uncompressed and gzipped)
    colors.min.css  647b (minified and gzipped)
    

    Changeset

    • Removes css for styling unqualified link attributes
    • Adds classes for setting border colors on html elements
    • Adds classes for setting stroke colors on svg elements
    • Adds classes for setting fill color on svg elements
    • Adds gulp plugins for renaming files before magnification. Fixes minifcation bug in build process
    • Removes livereload gulp plug in in favor of browser-sync.

    Now watch this and try not to smile: http://www.youtube.com/embed/7wMEAWcFZg0

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Mar 9, 2014)

Owner
murmurs
Generative artist. Computational designer. Exploring what can and can't be computed within design.
murmurs
A tiny script for generating attractive colors

Random Color A tiny script for generating attractive random colors. See the demo for an explanation and some samples. randomColor has been ported to C

David Merfield 5.9k Dec 24, 2022
JavaScript Library for creating random pleasing colors and color schemes

#PleaseJS www.checkman.io/please Please.js is a polite companion that wants to help you make your projects beautiful. It uses HSV color space to creat

Jordan Checkman 2.3k Dec 22, 2022
Extract prominent colors from an image. JS port of Android's Palette.

Vibrant.js Extract prominent colors from an image. Vibrant.js is a javascript port of the awesome Palette class in the Android support library. ⚠️ THI

Jari Zwarts 4.6k Dec 25, 2022
Generate colors based on a desired contrast ratio

Generate colors based on a desired contrast ratio

Adobe, Inc. 1.4k Jan 3, 2023
get colors in your node.js console

colors.js This is a fork of Marak Squires' original colors.js project Please check out the roadmap for upcoming features and releases. Please open Iss

Josh 5 Jan 11, 2022
Node Terminal Colors. Fast!

Tcol npm package to add colors to your terminal Installation # npm npm install tcol # pnpm pnpm install tcol Usage import { c } from "tcol"; console.

Posandu 4 May 13, 2022
Get colors in your node.js console

@colors/colors ("colors.js") Please check out the roadmap for upcoming features and releases. Please open Issues to provide feedback. get color and st

David Hyde 89 Dec 30, 2022
A simple Discord bot that will listen for HEX, RGB(a), and HSL(a) colors in a message, and provide a small image of that color.

Pigment For the teams of designers and developers out there - Pigment will listen for messages containing a HEX, RGB(a), or HSL(a) color, and provide

Conrad Crawford 17 Dec 8, 2022
Create your own complete Web color system fast and easy!

Simpler Color Create your own complete Web color system fast and easy, from as little as one base color! Color is at the heart of every UI design syst

Arnel Enero 278 Dec 20, 2022
⚡️The Fullstack React Framework — built on Next.js

The Fullstack React Framework "Zero-API" Data Layer — Built on Next.js — Inspired by Ruby on Rails Read the Documentation “Zero-API” data layer lets y

⚡️Blitz 12.5k Jan 4, 2023
colors.js - get colors in your node.js console

colors.js Please check out the roadmap for upcoming features and releases. Please open Issues to provide feedback, and check the develop branch for th

cronlabspl 4 Feb 9, 2022
chakra-radix-colors provides radix-ui color palettes, automatic dark mode, and acessible colors to chakra-ui applications

chakra-radix-colors chakra-radix-colors provides radix-ui color palettes, automatic dark mode, and acessible colors to chakra-ui applications. About C

null 11 Dec 30, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
❤️ JavaScript/TypeScript linter (ESLint wrapper) with great defaults

JavaScript/TypeScript linter (ESLint wrapper) with great defaults Opinionated but configurable ESLint wrapper with lots of goodies included. Enforces

XO 7k Jan 9, 2023
Create your own wrappings with optional key bindings for selected text, a set of useful defaults is also provided.

Create your own wrappings with optional key bindings for selected text, a set of useful defaults is also provided.

Seth Yuan 66 Jan 1, 2023
A Remix starter with intuitive defaults, like support for internationalization and localized URLs

?? Remix Starter A Remix starter with intuitive defaults, like support for internationalization and localized URLs. Coming soon: Authentication and au

Anand Chowdhary 51 Jan 8, 2023
The Basement SDK has sensible defaults and flexibility to allow you to get the data you want efficiently and effortlessly.

Basement SDK The Basement SDK has sensible defaults and flexibility to allow you to get the data you want efficiently and effortlessly. Installation B

Basement for Developers 10 Dec 6, 2022
A tiny script for generating attractive colors

Random Color A tiny script for generating attractive random colors. See the demo for an explanation and some samples. randomColor has been ported to C

David Merfield 5.9k Dec 24, 2022