All Projects → adobe → Leonardo

adobe / Leonardo

Licence: apache-2.0
Generate colors based on a desired contrast ratio

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Leonardo

SwiftColorWheel
Delightful color picker wheel for iOS in Swift.
Stars: ✭ 37 (-96.2%)
Mutual labels:  color, colorscheme, color-picker, colors, color-palette
Colorpicker
jQuery UI widget for color picking (similar to the one in Microsoft Office 2010).
Stars: ✭ 271 (-72.15%)
Mutual labels:  color, colors, color-picker, color-theme, color-palette
Colorschemes.jl
colorschemes, colormaps, gradients, and palettes
Stars: ✭ 55 (-94.35%)
Mutual labels:  color, colors, color-theme, color-palette
Nord
An arctic, north-bluish color palette.
Stars: ✭ 4,816 (+394.96%)
Mutual labels:  colors, colorscheme, color-theme, color-palette
pantone-colors
Hex values of all 2310 Pantone colors
Stars: ✭ 147 (-84.89%)
Mutual labels:  color, color-picker, colors, color-palette
Chromacolorpicker
🎨 An intuitive iOS color picker built in Swift.
Stars: ✭ 434 (-55.4%)
Mutual labels:  color, color-picker, color-theme, color-palette
Iceberg.vim
🇦🇶 Bluish color scheme for Vim and Neovim
Stars: ✭ 1,636 (+68.14%)
Mutual labels:  dark, color, colorscheme, color-theme
global-color-picker
start the script and click anywhere to get rgb value at the cursor location
Stars: ✭ 31 (-96.81%)
Mutual labels:  color, color-picker, colors
javascript-color-gradient
Lightweight JavaScript library, used to generate an array of color gradients, between start and finish colors.
Stars: ✭ 54 (-94.45%)
Mutual labels:  color, color-picker, color-palette
nord-tilix
An arctic, north-bluish clean and elegant Tilix color scheme.
Stars: ✭ 105 (-89.21%)
Mutual labels:  color, colorscheme, color-theme
Nord Visual Studio Code
An arctic, north-bluish clean and elegant Visual Studio Code theme.
Stars: ✭ 749 (-23.02%)
Mutual labels:  color, colorscheme, color-theme
react-native-color-panel
React Native Color Panel Component for iOS and Android 🏳️‍🌈
Stars: ✭ 21 (-97.84%)
Mutual labels:  color, color-picker, color-palette
epick
Color picker for creating harmonic color palettes that works on Linux, Windows, macOS and web.
Stars: ✭ 89 (-90.85%)
Mutual labels:  color-picker, colors, color-palette
React Colorful
🎨 A tiny (2,5 KB) color picker component for React and Preact apps
Stars: ✭ 951 (-2.26%)
Mutual labels:  a11y, color, color-picker
Nord Gnome Terminal
An arctic, north-bluish clean and elegant GNOME Terminal color theme.
Stars: ✭ 258 (-73.48%)
Mutual labels:  color, colorscheme, color-theme
Kallewheel
A custom color wheel extension for Adobe Photoshop
Stars: ✭ 16 (-98.36%)
Mutual labels:  color, color-picker, color-palette
stellarized
✦ paint vim with the stars ✦
Stars: ✭ 70 (-92.81%)
Mutual labels:  color, colorscheme, dark
Pickr
🎨 Flat, simple, multi-themed, responsive and hackable Color-Picker library. No dependencies, no jQuery. Compatible with all CSS Frameworks e.g. Bootstrap, Materialize. Supports alpha channel, rgba, hsla, hsva and more!
Stars: ✭ 3,759 (+286.33%)
Mutual labels:  color, color-picker, color-palette
colors
A gorgeous, accessible color system.
Stars: ✭ 748 (-23.12%)
Mutual labels:  color, colors, color-palette
react-native-image-color-picker
Image color picker based on image source provided and return image different color palettes or average color palette
Stars: ✭ 25 (-97.43%)
Mutual labels:  color, color-picker, color-palette

Leonardo logo

npm version license Pull requests welcome Web UI

Leonardo

Authoring adaptive color palettes for generating color based on a desired contrast ratio.

For a detailed walkthrough of Leonardo, check out this article.

Project Goals

To make it easier for designers and engineers to leverage color science to create custom interpolations for a value scale, and to make it easier for designers and engineers to conform to WCAG minimum contrast standards by using contrast ratio as the starting point, rather than a post-color-selection auditing process.

  1. Leonardo web application
  2. Show me a demo
  3. What is "adaptive color"?
  4. Using Leonardo
  5. Why are not all contrast ratios available?
  6. D3 Color
  7. Contributing
  8. Licensing

Leonardo web application

The Leonardo web application is a tool for designers and engineers to collaboratively build color scales for use in user interfaces. The tool exposes an interface to @adobe/leonardo-contrast-colors's generateContrastColors() function and displays visual aids for modifying the selection of a variable color and the target contrast ratios (swatches) to produce. The URL updates with your parameters for easily sharing links to team mates, and the app displays the specific config parameters when designers send you a version that they approve.

Leonardo web app with color inputs, interpolated gradient, contrast ratio input, and demo of colors applied to text and a button.

Show me a demo

Sometimes it's easier to express what you can do by showing you. Take a look at this demo app and play around with the brightness and contrast controls.

The controls are used to dynamically regenerate the entire UI color palette using generateContrastColors() functions as the end user (you) adjusts their settings. All of the changes to the UI colors are in conformity with the parameters set up by designers in the Leonardo web application ensuring that end users have the flexibility and control that they need while still upholding the design team's color choices.

What is adaptive color?

I've written about this concept in more detail at the following links. The goals of this project are to aid in fulfilling the tooling necessary to make adaptive color palettes available to designers and engineers.

Using Leonardo

See the @adobe/leonardo-contrast-colors README for details on how to use Leonardo in your app.

Why are not all contrast ratios available?

You may notice the tool takes an input (target ratio) but most often outputs a contrast ratio slightly higher. This has to do with the available colors in the RGB color space, and the math associated with calculating these ratios.

For example let's look at blue and white. Blue: rgb(0, 0, 255) White: rgb(255, 255, 255) Contrast ratio: 8.59:1

If we change any one value in the RGB channel for either color, the ratio changes: Blue: rgb(0, 1, 255) White: rgb(255, 255, 255) Contrast ratio: 8.57:1

If 8.58 is input as the target ratio with the starting color of blue, the output will not be exact. This is exaggerated by the various colorspace interpolations.

Since the WCAG requirement is defined as a minimum contrast requirement, it should be fine to generate colors that are a little more accessible than the minimum.

D3 Color

This project is currently built using D3 color. Although functionality is comparable to Chroma.js, the choice of D3 color is based on the additional modules available for state-of-the-art color appearance models, such as CIE CAM02.

The createScale() function is basically a wrapper function for creating a d3 linear scale for colors, with a few enhancements that aid in the generateContrastColors() function.

The Leonardo web app leverages d3 for additional features such as generating 2d and 3d charts.

Contributing

Contributions are welcomed! Read the Contributing Guide for more information.

Development

To get started developing Leonardo UI:

Note: Yarn must be installed on your machine

# Install dependencies
yarn install

# Change directory to Leonardo UI
cd packages/ui

# Run local server
yarn dev

To get started developing Leonardo contrast-colors package:

# From root, change directory to contrast-colors
cd packages/contrast-colors

# Run tests and watch for changes
yarn dev

Then, visit the live reloading web UIs here: http://localhost:1234/index.html http://localhost:1234/demo.html

Licensing

This project is licensed under the Apache V2 License. See LICENSE for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].