Convert Figma logo to code with AI

yeun logoopen-color

Color scheme for UI design.

5,271
240
5,271
23

Top Related Projects

9,298

Smarter defaults for colors on the web.

Sans serif font family for user interface environments

Typeface for setting text in many sizes, weights, and languages. Designed to complement Source Sans.

Monospaced font family for user interface and coding environments

Quick Overview

Open Color is a set of color palettes for UI design and development. It provides a consistent and harmonious color scheme that can be used across different projects and platforms.

Pros

  • Consistent Color Scheme: Open Color provides a well-designed and cohesive color palette that can be used consistently across different projects and platforms.
  • Wide Range of Colors: The project offers a wide range of colors, including various shades of gray, blue, red, green, yellow, and more, making it suitable for a variety of design needs.
  • Easy to Use: The color palette is available in various formats, including CSS, Sass, Less, and Stylus, making it easy to integrate into web and mobile projects.
  • Open Source: Open Color is an open-source project, allowing developers and designers to contribute, customize, and extend the color palette as needed.

Cons

  • Limited Customization: While the color palette is extensive, it may not always fit the specific needs of a project, and customization options are limited.
  • Dependency on External Library: Using Open Color requires including the external library in your project, which may increase the overall project size and complexity.
  • Potential Compatibility Issues: Depending on the project's technology stack, there may be compatibility issues when integrating the color palette, especially with older or less-supported CSS preprocessors.
  • Lack of Accessibility Considerations: The project does not explicitly address accessibility concerns, such as color contrast ratios, which may be an important factor for some projects.

Code Examples

Here are a few examples of how to use Open Color in your project:

CSS:

/* Using Open Color in CSS */
.element {
  color: var(--oc-gray-9);
  background-color: var(--oc-blue-5);
}

Sass:

// Using Open Color in Sass
@import "open-color";

.element {
  color: $oc-gray-9;
  background-color: $oc-blue-5;
}

Less:

// Using Open Color in Less
@import "open-color";

.element {
  color: @oc-gray-9;
  background-color: @oc-blue-5;
}

Stylus:

// Using Open Color in Stylus
@import "open-color"

.element
  color oc-gray-9
  background-color oc-blue-5

Getting Started

To use Open Color in your project, follow these steps:

  1. Install the Open Color package using your preferred package manager:

    • npm: npm install open-color
    • Yarn: yarn add open-color
  2. Import the Open Color styles in your project:

    • CSS: @import "open-color/open-color.css";
    • Sass: @import "open-color/open-color";
    • Less: @import "open-color/open-color";
    • Stylus: @import "open-color/open-color"
  3. Use the Open Color variables or classes in your CSS, Sass, Less, or Stylus code:

    • CSS: color: var(--oc-gray-9);
    • Sass: color: $oc-gray-9;
    • Less: color: @oc-gray-9;
    • Stylus: color oc-gray-9

That's it! You can now use the consistent and harmonious color palette provided by Open Color in your project.

Competitor Comparisons

9,298

Smarter defaults for colors on the web.

Pros of mrmrs/colors

  • Provides a larger color palette with 72 named colors, compared to the 292 colors in yeun/open-color.
  • Includes a simple and intuitive API for accessing and using the colors.
  • Supports a variety of output formats, including CSS, Sass, Less, and Stylus.

Cons of mrmrs/colors

  • The color palette may not be as comprehensive or diverse as yeun/open-color.
  • The project is less actively maintained, with the last commit being over 2 years ago.
  • The documentation and community support may not be as extensive as yeun/open-color.

Code Comparison

mrmrs/colors:

.red { color: #ff4136; }
.green { color: #2ecc40; }
.blue { color: #0074d9; }

yeun/open-color:

.oc-red { color: #ff6b6b; }
.oc-green { color: #51cf66; }
.oc-blue { color: #339af0; }

Sans serif font family for user interface environments

Pros of Source Sans

  • Source Sans is a high-quality, open-source font family developed by Adobe, ensuring consistent and professional-looking typography.
  • The font family includes a wide range of weights and styles, providing flexibility for various design needs.
  • Source Sans is widely used and supported, making it a reliable choice for web and print projects.

Cons of Source Sans

  • Open Color has a more extensive color palette, with 148 predefined colors, while Source Sans is limited to a single font family.
  • Open Color is a more lightweight and focused project, while Source Sans is part of a larger font ecosystem from Adobe.
  • The Open Color project is actively maintained, while the development of Source Sans may be less frequent.

Code Comparison

Open Color:

$yellow-0: #fffae6;
$yellow-1: #fff3c1;
$yellow-2: #ffe581;
$yellow-3: #ffd43b;
$yellow-4: #fcc419;

Source Sans:

@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 400;
  src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7l.woff2) format('woff2');
}

Typeface for setting text in many sizes, weights, and languages. Designed to complement Source Sans.

Pros of Source Serif

  • Source Serif is a high-quality, open-source font family designed for optimal readability in print and on-screen.
  • The font family includes a wide range of weights and styles, making it suitable for a variety of design needs.
  • Source Serif is actively maintained and regularly updated by the Adobe Fonts team.

Cons of Source Serif

  • The font family is not as widely used or well-known as some other open-source font options.
  • The licensing terms may be more restrictive than some other open-source font projects.
  • The installation and usage process may be more complex than some other font options.

Code Comparison

Open Color:

$yellow: #ffce3d;
$orange: #fd7e14;
$red: #f03e3e;
$pink: #e64980;
$grape: #be4bdb;

Source Serif:

font-family: 'Source Serif Pro', serif;
font-weight: 400;
font-style: normal;
font-size: 16px;
line-height: 1.5;

Monospaced font family for user interface and coding environments

Pros of Source Code Pro

  • Source Code Pro is a well-established and widely-used monospace font family, developed by Adobe, with a focus on programming and code-related tasks.
  • The font family includes a wide range of weights and styles, providing flexibility in font selection for different use cases.
  • Source Code Pro has been optimized for high-quality rendering on screen, making it a popular choice for developers and designers.

Cons of Source Code Pro

  • Open Color is a more comprehensive color palette, covering a wider range of hues and shades, while Source Code Pro is primarily focused on a monospace font family.
  • The Open Color project is actively maintained and regularly updated, while the development of Source Code Pro may be less frequent.

Code Comparison

Open Color:

$yellow1: #fff9db;
$yellow2: #fff3c1;
$yellow3: #ffe98a;
$yellow4: #ffd54f;
$yellow5: #ffc107;

Source Code Pro:

font-family: 'Source Code Pro', monospace;
font-weight: 400;
font-style: normal;

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

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

NPM DownloadsLast 30 Days