Socket
Socket
Sign inDemoInstall

open-color

Package Overview
Dependencies
0
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    open-color

Open color scheme for web UI


Version published
Weekly downloads
5.3K
decreased by-21.57%
Maintainers
2
Install size
48.0 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 17 Aug 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc