Giter Club home page Giter Club logo

open-color's Introduction

Open color

Open color is an open-source color scheme optimized for UI like font, background, border, etc.

Goals

  • All colors shall have adequate use
  • Provide general color for UI design
  • All colors will be beautiful in itself and harmonious
  • At the same brightness level, the perceived brightness will be constant

Note

  • The colors are subject to change in the future. Thus, using an Open color as a main identity color is not recommended.

Available Colors

available colors

Installation

$ npm install open-color

or

$ bower install open-color

Currently Supported Formats, Language Environments, Libraries

CSS, Sass, Less, Stylus, JSON, SVG, TeX, Open Color Tools (.oco), PowerPaint (.rcpx), Sketch (.sketchpalette), Inkscape, aco, clr, Tailwind, TypeScript

Variable Convention

Sass, SCSS

$oc-(color)-(number)

Less

@oc-(color)-(number)

Stylus

oc-(color)-(number)

CSS

--oc-(color)-(number)

  • oc: Abbreviation for Open color
  • (color): Color name such as gray, red, lime, etc.
  • (number): 0 to 9. Brightness spectrum.

How to Use

Import the file to your project and use the variables.

Example for Sass, SCSS

@import 'path/open-color';

.body {
  background-color: $oc-gray-0;
  color: $oc-gray-7;
}

a {
  color: $oc-teal-7;

  &:hover,
  &:focus,
  &:active {
    color: $oc-indigo-7;
  }
}

Example for Tailwind CSS

module.exports = {
  presets: [require("./open-color.js")],
  purge: [],
  mode: "jit",
  darkMode: false,
  theme: {
    extend: {},
  },
  variants: {
    extend: {},
  },
  plugins: [],
};

Example for Less

@import 'path/open-color';

.body {
  background-color: @oc-gray-0;
  color: @oc-gray-7;
}

a {
  color: @oc-teal-7;

  &:hover,
  &:focus,
  &:active {
    color: @oc-indigo-7;
  }
}

Example for Stylus

@import 'path/open-color.styl'

.body
  background-color: oc-gray-0
  color: oc-gray-7

a
  color: oc-teal-7

  &:hover
  &:focus
  &:active
    color: oc-indigo-7

Example for CSS

@import 'path/open-color.css';

.body {
  background-color: var(--oc-gray-0);
  color: var(--oc-gray-7);
}

a {
  color: var(--oc-teal-7);
}

a:hover,
a:focus,
a:active {
  color: var(--oc-indigo-7);
}

Other Language Bindings

open-color's People

Contributors

appleparan avatar basixkor avatar citrusui avatar darlanmendonca avatar dependabot[bot] avatar diagramatics avatar hyunseob avatar isovel avatar jmegs avatar jsynacek avatar k15a avatar kasiriveni avatar lessthanzero avatar limonte avatar lipis avatar lowmess avatar m-e-h avatar makepanic avatar nick-f avatar oanhgle avatar pouya-moh avatar rebeccargb avatar rokt33r avatar surjithctly avatar tanykim avatar wayneashleyberry avatar xaviju avatar xnuk avatar yeun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-color's Issues

Printed Copy of Colours.

I like your open-colo schemer, but I cant seem to be able to print off any of the swatches even when I set printer to print background colours.
I will be using the SCSS file as a partial file importing to main style file.
I can,t print colours on any of the other program swatches which makes it difficult to choose without having swatches front of you. Am I dealing with it in the right way, I am using RUBY plus SASS and SUSY as a preprocessor, but placing scss file in SASS directory for import(Partial file)
Thank you Brianran

Provide rgb values to support css custom properties.

Hey,

css custom properties are close to being supported in all evergreen browsers, yeah 🎉 .
However, the color function is not anywhere close to being released. This means, if you want to use a color that has transparency without a pre-processor you need the raw rgb values.

For this I would ask you to add rgb values to the css colors, maybe like so:

--oc-orange-9: #d9480f;
--oc-orange-9-rgb: 217, 72, 15;

It is important that only the three values are specified, NOT rgb because this way you can do the following:

background: rgba(var(--oc-orange-9-rgb), .5);

This would make open-colors work with native css custom properties inside rgba so transparency can be set by the user, which would be awesome.

Copying a hex value without hash is actively made hard

Hey there,

when selecting any region of the hex color value, the whole value will be selected including the # symbol. Each selection attempt aiming for only parts of the hex value fails due to the selection being automatically expanded.

First of all, there are applications that require the prefixed version and applications that require an unprefixed version. Therefor I think it should be able to copy the text as usual. In my opinion the auto expansion of the selection area is a hindrance.

This becomes especially problematic when using tools like Blender that truncate the hex value to 6 characters. Copying a hex value with the hash symbol #ababab will result in #ababa being pasted. Since one is not able to copy only the hex value, it’s required to type the values by hand or copy them to a text field to manipulate. I understand that this would not be a problem if Blender would just remove the leading # on each paste attempt to the hex value field.

TL;DR: The auto-expansion of hex value selection is overly aggressive and makes things unnecessarily complicated in some cases.

Temporary Workaround: Disable JavaScript in dev tools.

There is no TS definition file on npm registry

Hi, I tried to use open-color with TypeScript, but something's wrong.
I have installed with yarn, and I just see that definition file has not installed.
As you know, there is a definition file on GitHub repository. I guess the definition file has not published because you have published on npm registry without running compile-templates.js. (not sure) So, I propose setting the prepublish hook for making sure generating compiled files. As follow:

{
  "scripts": {
    "test": "npm run test-typescript",
    "test-typescript": "tsc open-color.d.ts tests/typescript.ts --noEmit",
    "compile-templates": "node compile-templates.js",
    "prepublish": "npm run compile-templates"
  }
}

If you want, I can make a PR.

Thank you!

Website - Ingredients

I was hoping you could add a small color swatch next to the corresponding color on the ingredients page? I keep needing to go back to the swatches page to remember what the color looked like, a small swatch of the colors next to the color name would make easier to navigate. (i.e. Blue 1, Blue 2, etc... )

Suggestions for additional colors

First of all, fantastic project. It's very difficult to pick shades of attractive hues that have an equal perceived brightness, yet you managed somehow. Extremely valuable.

I know you've commented on some color suggestions already, but I still like to make a plea for a small set of color additions.

Brown
I know you mentioned that you have no plans for it. Justification to perhaps reconsider is that brown is the only missing hue compared to the widely used Material Design colors. I much prefer the consistency of Open Color, and adding brown would make Open Color a feature complete rival in terms of hues, yet with better picked shades.

Cold, Neutral, Warm Gray
The current gray is not neutral, it's slightly cool (blue). I believe gray needs special attention as it is often used as a main UI background, and even the slightest hue change has a far reaching effect on the whole UI.

My suggestion would be to have a truly neutral gray ramp, a slightly cold one (like the current one), and a slightly warm one.

Whatever your answer, again, great work!

Typings for typescript

I don't have a time to create a PR.(To be honest, I don't know how to test these types.) But, there should be someone need this!

type Color = string

declare module 'open-color' {
  interface OpenColor {
    white: Color
    black: Color
    gray: Color[]
    red: Color[]
    pink: Color[]
    grape: Color[]
    violet: Color[]
    indigo: Color[]
    blue: Color[]
    cyan: Color[]
    teal: Color[]
    green: Color[]
    lime: Color[]
    yellow: Color[]
    orange: Color[]
  }
  const OpenColor: OpenColor
  export default OpenColor
}

bower package

First congratulations for the project, is awesome !!

Just for convenience, has intention to add the project as a bower package?

Color blindness

What does this mean?
"All the color is tested on deuteranopia and protanopia mode"

Here's what I'm seeing:
color blindness

NPM install SASS or LESS option

Add a question to set which CSS complier is desired: SASS as a default option, LESS as an additional one.

$ npm install open-color
Which compiler do you want to use?

  1. SASS/SCSS (default)
  2. LESS

Adjust hue value of blue

screen shot 2016-12-26 at 11 01 25 pm

The text color is $oc-blue-5 and the border bottom is $oc-blue-3. In this image, the third color is greener than the fifth.

Live preview with copy & paste

Hey @yeun @makepanic,

I was just thinking an additional, very nice feature would be a live preview of the colors (html) with a copy functionality (user should be able to choose the format?).

Just like here: http://flatuicolors.com

For example I am currently using the colors as defaults for some web components. However, I am not loading the package into the components to keep it small. For this kind of workflow, or other design tools that do not have a palett to include, this would be very awesome addition to /docs.

Error while trying to @import using Bower and Gulp

Hi there,

While trying to @import using Bower and Gulp I receive the following error:

@import 'open-color';

Error: It's not clear which file to import for '@import "open-color"'.
       Candidates:
         open-color.scss
         open-color.css
       Please delete or rename all but one of these files.

I think renaming the open.color.scss file to _open-color.scss should fix this. If you can't do this for whatever reason I understand maybe there is another way around it.

I hope you can help. Thanks!

Website layout breaks in Safari on large screens

When viewing the documentation in Safari on a screen larger than 1600px wide, the layout breaks.

Broken layout in Safari

This seems to be caused by the .not( ) SCSS lines applying the styles to every element that doesn't match the rules (so almost every element on the page). Currently .not is only supported in Safari on macOS and iOS (CanIUse.com) so the layout doesn't break in other browsers (Chrome, etc.).

CSS Variables + Current Browser Support

Hi, there! First of all, thanks so much for this awesome project. I've used it a few times already in personal and work projects. The scheme and extensibility is great!

Up until now I've only used the SCSS version of Open Color, but an upcoming project requires plain old CSS. Your current CSS version of Open Color leverages variables/custom properties which don't seem to be supported by all modern browsers yet (http://caniuse.com/#feat=css-variables).

Am I missing something in the doc/src? Do you have a specific way that you implement the CSS version across browsers (e.g. polyfill)?

Thanks again for the great work and the help in advance.

Provide a Craft Library for Sketch

Craft is an amazing plugin suite for Sketch. It includes Library, which is a powerful plugin for saving and sharing styles, shapes, colors, etc.

It would be great to see Open Color ported to Craft Library and making the imports much easier with just a pull of the repo.

Adjust Red 5

Compared to variant 5 of the other colours, Red 5 looks a bit washed out. I've used Red 6 for now, as it compliments the other variants 5's better at the moment.

Prettier Gimp pallette

Currently with Columns: 0 here there is no organization of the palette.
gimp0col

Assuming 0-9 for color variations, Columns: 10 would produce an organized palette.
gimp10col
This also relies on #40

This has no effect on Inkscape.

It also might make sense to rename this template to open-color.gpl.hbs to stay consistent with the other naming conventions. It's also used for several open source applications.

Additional Gray Palletes

The current gray palette appears to land a little on the cool side of neutral. A “warm”, “neutral”, and “cool” gray palette would be useful for mixing with the various shades.

Gray 5 color fails color contrast ratio test

In the instructions Here gray 5 is recommended for text(with white background) which fails WCAG 2.0 color contrast test, hence making it inaccessible for anyone with low vision impairments and color deficiencies.
screen shot 2017-01-10 at 11 06 03 pm

Gravit Designer

Hey guys! Thanks for this project!

I've been using Gravit Designer on Ubuntu because i'm without my mac and gravit has a another kind of palette that insn't in your project options. It's called .gvswatch.

Any plans for this extension?

Add exhaustive list of available colors

Available colors, as of 29 September, are as following (sorted by alphabetical order):

blue
cyan
grape
gray
green
indigo
lime
orange
pink
red
teal
violet
yellow

I think that would be more helpful if we can find the list on README.

Script for change color hex at once

Script for change hex value in the list below.

  • open-color.less
  • open-color.scss
  • open-color.css
  • docs/_config.yml
  • docs/_sass/_open-color.scss
  • docs/download/open-color__._.*.aco
  • docs/download/open-color__._.*.ase
  • docs/download/open-color__._.*.sketchpalette

Feature: LaTeX colors

Hi.

For personal use, I created a latex scheme based on open-color.css. I can make a pull request if other are interested or it fits the purpose of the repo.

Pouya-moh@a0be41e

Make color navigation sidebar follow scrolling

It would be nice if the sidebar on the left side followed when you scroll down, maybe even show a "back to top" at the bottom, since the length of the website varies depending on your aspect ratio.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.