Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix usage of contrast-colors with commonjs and esm #185

Open
wants to merge 192 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
bcab4cf
Merge pull request #1 from adobe/readmeUpdates
NateBaldwinDesign Dec 6, 2019
4d31a11
Create CNAME
NateBaldwinDesign Dec 7, 2019
e3147e3
build: copy CNAME into dist
lazd Dec 7, 2019
baeb130
build: moved CNAME to ui package
NateBaldwinDesign Dec 7, 2019
e5ecfa5
Merging conflicts with local
NateBaldwinDesign Dec 7, 2019
b73dfa8
added www to CNAME
NateBaldwinDesign Dec 7, 2019
608b5c0
build: remove www from CNAME
lazd Dec 7, 2019
f6f92c9
style: fixed issue with tabs indicator color fallback
NateBaldwinDesign Dec 7, 2019
15b5b76
Merge pull request #7 from adobe/css-fixes
NateBaldwinDesign Dec 7, 2019
52d8b1e
feat: adding link to demo app in UI
NateBaldwinDesign Dec 7, 2019
e957d59
Merge pull request #8 from adobe/demo-link
NateBaldwinDesign Dec 7, 2019
d778162
build(deps): bump serialize-to-js from 3.0.0 to 3.0.2
dependabot[bot] Dec 8, 2019
0b894e6
style: Updated demo app to a calendar with more colors to demonstrate
NateBaldwinDesign Dec 9, 2019
c1ad80a
Merge pull request #15 from adobe/demo-app
NateBaldwinDesign Dec 9, 2019
2916b85
style: updated styles of links and reverted buttons with function to …
NateBaldwinDesign Dec 9, 2019
6f7ed04
Merge pull request #16 from adobe/bugfix-demo
NateBaldwinDesign Dec 9, 2019
81d38e9
Merge pull request #14 from adobe/dependabot/npm_and_yarn/serialize-t…
NateBaldwinDesign Dec 9, 2019
e0eb9b4
feat: colorscale as HTML Canvas
NateBaldwinDesign Dec 9, 2019
7d39d6d
style: cleanup code in canvas generation
NateBaldwinDesign Dec 9, 2019
2eabbb0
Merge pull request #17 from adobe/colorscale-canvas
NateBaldwinDesign Dec 9, 2019
b8a2666
build: switch to Jest, fix issues with babel vs node and default
lazd Dec 9, 2019
f786270
chore: remove stray console.log
lazd Dec 9, 2019
c7d430f
build: jest is a dev dependency
lazd Dec 9, 2019
4f9f25e
build: add missing @babel/core dependency
lazd Dec 9, 2019
d85e29b
build: use yarn for all the things
lazd Dec 9, 2019
625b517
style: dropdown width override to correct width
NateBaldwinDesign Dec 9, 2019
fc16863
Merge pull request #18 from adobe/bugfix-dropdown-width
NateBaldwinDesign Dec 9, 2019
01091fe
chore: prepare for release
lazd Dec 9, 2019
9a0913f
chore(release): release
lazd Dec 9, 2019
804f9fe
build: work around svg/svgo/issues/1198
lazd Dec 9, 2019
7b69fdf
docs: adding issue and pr templates for github (#21)
NateBaldwinDesign Dec 10, 2019
34940e0
fix(contrast-colors): Add d3 as dependency (#25)
joestrouth1 Dec 12, 2019
18c60de
chore(release): release
lazd Dec 12, 2019
e7b10ca
build: fix contrast-colors version
lazd Dec 12, 2019
a1294f3
fix(ui): Update URL in README (#28)
joestrouth1 Dec 17, 2019
6705c44
feat(ui): Increment ratio input by whole number when Shift is pressed
joestrouth1 Dec 17, 2019
502d08b
match semicolon style
joestrouth1 Dec 17, 2019
dc9c91c
fix(issue #23) slow color update (#26)
georapbox Dec 18, 2019
d416a13
docs: Fix link in table of conntents (#30)
KevinGimbel Dec 18, 2019
b492d23
Merge branch 'step-input' of https://github.com/joestrouth1/leonardo …
NateBaldwinDesign Dec 18, 2019
5a217d2
Merge branch 'joestrouth1-step-input'
NateBaldwinDesign Dec 18, 2019
1da924d
Update issue templates
NateBaldwinDesign Jan 3, 2020
32c6441
added site analytics to index and demo (#38)
NateBaldwinDesign Jan 11, 2020
340eb3b
removed content that bled over from other branch (#39)
NateBaldwinDesign Jan 11, 2020
213f065
updated issue templates
NateBaldwinDesign Jan 11, 2020
f761c0a
Color converter (#40)
NateBaldwinDesign Jan 12, 2020
729add0
corrected order of colorspaces in converter for consistency
NateBaldwinDesign Jan 12, 2020
e27fc86
feat: added hex to output conversion types (#41)
NateBaldwinDesign Jan 12, 2020
34a7686
fix: changed form to div in converter to prevent refresh on submit (#43)
NateBaldwinDesign Jan 13, 2020
5c780b7
fix: corrected midtone color outputs (#46)
NateBaldwinDesign Jan 21, 2020
d0da2ee
chore(release): release
NateBaldwinDesign Jan 21, 2020
91097fd
fix: corrected charts with proper colors and data (#53)
NateBaldwinDesign Jan 29, 2020
dc11faa
docs: added badges to README files (#55)
NateBaldwinDesign Feb 11, 2020
91660a9
Generate adaptive theme (#35)
NateBaldwinDesign Feb 18, 2020
c18ce6f
docs: added development instructions to project-level readme (#56)
NateBaldwinDesign Feb 26, 2020
d0d487a
Generate theme UI (#54)
NateBaldwinDesign Feb 28, 2020
f7b3b69
chore(release): release
NateBaldwinDesign Feb 28, 2020
e1a1071
Added smooth interpolation
DmitryBaranovskiy Mar 4, 2020
dc3257e
Added special colours black & white colours.
DmitryBaranovskiy Mar 6, 2020
9722d5b
fix: ensured smooth is false by default & verified tests passing and …
NateBaldwinDesign Mar 6, 2020
b88a6f5
Merge branch 'DmitryBaranovskiy-master'
NateBaldwinDesign Mar 6, 2020
9755ea1
build(deps): bump acorn from 5.7.3 to 5.7.4 (#68)
dependabot[bot] Apr 7, 2020
7541dc1
fix: remove Babel, use ESM wrapper approach for Node 13.x ESM support…
lazd May 4, 2020
8c35b31
chore(release): release
NateBaldwinDesign May 4, 2020
6e311c8
docs: add note about CJS/ESM imports (#73)
lazd May 4, 2020
5103d68
docs: remove broken API reference link
lazd May 4, 2020
da4f9f7
feat: add support to numeric-only hex values in bulk import (#83) (#87)
fedeci Aug 12, 2020
9c84255
build(deps): bump lodash from 4.17.15 to 4.17.19 (#84)
dependabot[bot] Aug 12, 2020
e936ca4
build(deps): bump elliptic from 6.5.1 to 6.5.3 (#86)
dependabot[bot] Aug 12, 2020
89f54a4
fix: string separated by commas and space resulted in extra space in …
NateBaldwinDesign Aug 12, 2020
4e518ed
Custom output color names option (#81)
NateBaldwinDesign Aug 12, 2020
72094f8
Output format (#78)
NateBaldwinDesign Aug 12, 2020
34d38f0
chore(release): release
NateBaldwinDesign Aug 12, 2020
15de9ae
Add Typescript support (#90)
fedeci Aug 18, 2020
fd55743
chore(release): release
NateBaldwinDesign Aug 18, 2020
66c9b3a
Contrast checker (#92)
NateBaldwinDesign Sep 3, 2020
273dd74
added missing xlink
NateBaldwinDesign Sep 3, 2020
c32af39
bugfix: icon color in contrast checker
NateBaldwinDesign Sep 3, 2020
b402eae
removed icon from contrast demo
NateBaldwinDesign Sep 3, 2020
a436b67
trivial: style fix
NateBaldwinDesign Sep 3, 2020
7d3dedf
added linear interpolation to resolve alpha transparency for calculat…
NateBaldwinDesign Sep 4, 2020
e616997
Alpha contrast (missing commits) (#94)
NateBaldwinDesign Sep 4, 2020
a70813c
fix: title/description for contrast checker page
NateBaldwinDesign Sep 8, 2020
e8ade27
Improve typescript support (#97)
fedeci Sep 8, 2020
636c6d2
chore(release): release
NateBaldwinDesign Sep 8, 2020
6bdc954
set contrast to optional in typescript (#101)
NateBaldwinDesign Sep 14, 2020
84d8ba9
build(deps): bump ini from 1.3.5 to 1.3.8 (#105)
dependabot[bot] Feb 17, 2021
a252df1
Issue 60 fix: binary search to return closest larger number (#104)
bhavika24 Mar 22, 2021
dddacb4
refactored primary functions as Class functions and updated tests
NateBaldwinDesign Mar 19, 2021
77c63ff
adding tests for single color
NateBaldwinDesign Mar 22, 2021
e490e14
refactored binarysearch
NateBaldwinDesign Mar 24, 2021
247909b
Refactored binary search as getMatchingRatioIndex, improved overall a…
NateBaldwinDesign Mar 25, 2021
40f1179
added remaining conversion tests and fixed errors
NateBaldwinDesign Mar 26, 2021
681d5b9
added colorspace validation for colorspace and output parameters
NateBaldwinDesign Mar 26, 2021
5ed3b21
build(deps): bump elliptic from 6.5.3 to 6.5.4 (#108)
dependabot[bot] Mar 26, 2021
248746c
build(deps): bump node-fetch from 2.6.0 to 2.6.1 (#103)
dependabot[bot] Mar 26, 2021
2a41e21
updated dev dependency and semicolon styles
NateBaldwinDesign Apr 14, 2021
6e88801
Update packages/contrast-colors/index.js
NateBaldwinDesign Apr 14, 2021
94f9e10
Update packages/contrast-colors/index.js
NateBaldwinDesign Apr 14, 2021
9bf08ea
Update packages/contrast-colors/index.js
NateBaldwinDesign Apr 14, 2021
27a4e18
Update packages/contrast-colors/index.js
NateBaldwinDesign Apr 14, 2021
5ac1626
Update packages/contrast-colors/index.js
NateBaldwinDesign Apr 14, 2021
36ed0e4
added else condition to end of getMatchingRatioIndex function
NateBaldwinDesign Apr 14, 2021
c836a67
build(deps): bump y18n from 4.0.0 to 4.0.1 (#111)
dependabot[bot] Apr 15, 2021
99af29d
had to reference d3plus for CAM02p interpolator to work
NateBaldwinDesign May 15, 2021
be8aafe
removed setContrasts and apply multiplier when returning colors
NateBaldwinDesign May 15, 2021
c27b53b
updated readme
NateBaldwinDesign May 27, 2021
cac29d7
reformatted readme
NateBaldwinDesign May 27, 2021
8f8f5ff
trivial
NateBaldwinDesign May 27, 2021
c58dfd4
trivial
NateBaldwinDesign May 27, 2021
a9764c4
more readme update
NateBaldwinDesign May 27, 2021
25b792b
simplified first example of use in readme
NateBaldwinDesign May 27, 2021
8b2946c
build(deps): bump ssri from 6.0.1 to 6.0.2 (#112)
dependabot[bot] May 27, 2021
ec4eb3b
build(deps): bump handlebars from 4.5.3 to 4.7.7 (#114)
dependabot[bot] May 27, 2021
b52d8de
build(deps): bump lodash from 4.17.19 to 4.17.21 (#115)
dependabot[bot] May 27, 2021
8f540b4
build(deps): bump hosted-git-info from 2.8.5 to 2.8.9 (#116)
dependabot[bot] May 27, 2021
2fdf298
build(deps): bump browserslist from 4.7.3 to 4.16.6 (#117)
dependabot[bot] May 27, 2021
9f04bf4
updated theme and index for UI to reference class functions and outpu…
NateBaldwinDesign May 27, 2021
e8276d9
corrected function output for theme
NateBaldwinDesign May 27, 2021
2cde68a
changed theme ramps to css gradients to lessen shifting between color…
NateBaldwinDesign May 27, 2021
94194cd
ESLint setup
Aug 2, 2021
5233afb
Calculating contrast on demand
Aug 2, 2021
fbdb424
Added CIECAM02
Aug 2, 2021
fcb89af
Started work on d3 replacement with chroma.js
Aug 2, 2021
a7064b3
Removing D3 WIP
Aug 3, 2021
e925ac3
D3 removal cleanup
Aug 3, 2021
ce1fe9c
Fixing some tests, braking some…
Aug 5, 2021
479db47
Fixing tests
Aug 5, 2021
8b5a28a
Fixing more tests. Installed new CIECAM02 library.
Aug 6, 2021
ef73e73
Test fix
Aug 6, 2021
3c4d843
Last test fix
Aug 10, 2021
d88c48a
Clean the comments
Aug 10, 2021
9273b7f
A bit of improvement for BezLen
Aug 11, 2021
aa387b9
Added `chroma.getCSSGradient(scale, [length])`
Aug 19, 2021
51160fa
More optimal default precision for CSS gradients
Aug 19, 2021
7093d8a
corrected dependencies for contrast-colors package
NateBaldwinDesign Aug 19, 2021
b05110a
Removing `getMatchingRatioIndex` function
Aug 20, 2021
9eb289f
Merge branch 'class-function' into dmitry/cleaning
Aug 20, 2021
dc82112
added a few small tests for searchColors function
NateBaldwinDesign Aug 20, 2021
b37811f
Class function (#110)
NateBaldwinDesign Aug 20, 2021
f4d9171
added badges for package sizes to readme
NateBaldwinDesign Aug 20, 2021
0aebcff
Theme UI bugfixes (#126)
NateBaldwinDesign Aug 20, 2021
1dba2c5
updated yarn.lock
NateBaldwinDesign Aug 20, 2021
1fb08b8
chore(release): release
NateBaldwinDesign Aug 20, 2021
03f32f5
added badges regarding package sizes to contrast-colors readme (#128)
NateBaldwinDesign Aug 20, 2021
5caa7ee
build(deps): bump tar from 4.4.13 to 4.4.19 (#127)
dependabot[bot] Aug 24, 2021
2e9ed4d
build(deps): bump ws from 7.4.5 to 7.5.3 in /packages/contrast-colors…
dependabot[bot] Aug 24, 2021
d78fec5
build(deps): bump color-string from 1.5.3 to 1.6.0 (#124)
dependabot[bot] Aug 24, 2021
b9fbb4e
build(deps): bump browserslist from 4.16.3 to 4.16.8 (#123)
dependabot[bot] Aug 24, 2021
e57b476
modified Readme of contrast-colors to reference Chroma.js
NateBaldwinDesign Aug 25, 2021
48e8c35
Merge branch 'main' into dmitry/cleaning
NateBaldwinDesign Aug 25, 2021
5533979
Merge branch 'main' into dmitry/cleaning
NateBaldwinDesign Aug 25, 2021
52b3ec3
Merge branch 'dmitry/cleaning' into main
NateBaldwinDesign Aug 25, 2021
d651ca0
corrected convertColorValue.test.js error and updated yarn.lock
NateBaldwinDesign Aug 25, 2021
b407a48
build(deps): bump ws from 5.2.2 to 5.2.3 (#122)
dependabot[bot] Aug 25, 2021
3bd6361
build(deps): bump path-parse in /packages/contrast-colors (#121)
dependabot[bot] Aug 25, 2021
713ac6e
build(deps): bump path-parse from 1.0.6 to 1.0.7 (#120)
dependabot[bot] Aug 25, 2021
070a525
added output format Theme.contrastColorPairs (#132)
NateBaldwinDesign Sep 1, 2021
2f0a54b
Performance improvements (#130)
DmitryBaranovskiy Sep 7, 2021
6f2d502
calling createScale to generate theme ramp (#135)
NateBaldwinDesign Sep 7, 2021
82a3d14
updated package.json, package-lock.json, and yarn with proper dependa…
NateBaldwinDesign Sep 7, 2021
b2c2c1d
chore(release): release
NateBaldwinDesign Sep 7, 2021
d31d6df
modified buildSite script to bypass parcel minify
NateBaldwinDesign Sep 7, 2021
39caca7
Theme saturation (#139)
NateBaldwinDesign Sep 14, 2021
79d241f
chore(release): release
NateBaldwinDesign Sep 14, 2021
beb6d88
fix: typo in theme constructor for saturation (#140)
NateBaldwinDesign Sep 14, 2021
bab79e1
chore(release): release
NateBaldwinDesign Sep 14, 2021
d972e82
Fixed demo.html and upgraded a few css dependencies (#145)
NateBaldwinDesign Oct 13, 2021
6bbfff6
UI redesign & enhancements (#155)
NateBaldwinDesign May 5, 2022
7a7ab99
chore: upgraded caniuse-lite
NateBaldwinDesign May 5, 2022
54fe5e5
fix: BackgroundColor length threshold updated to >=
NateBaldwinDesign May 5, 2022
0b6f38b
chore(release): release
NateBaldwinDesign May 5, 2022
ed12735
updated contrast-colors version in UI dependency
NateBaldwinDesign May 5, 2022
947d1c7
fix: added alpha blend when compliance level changed in color compare
NateBaldwinDesign May 5, 2022
42e4a15
fix: bugs in XML, SVG color outputs for scales. Removed console.logs
NateBaldwinDesign May 5, 2022
a4c206d
fix: corrected URL redirect for backwards compatability (#157)
NateBaldwinDesign May 9, 2022
165ebaa
fix: update gh-pages so deploy deletes old files (#158)
lazd May 10, 2022
7eab1c3
fix: clean dist before deploy
lazd May 10, 2022
35fd2cf
package-lock.json update with release
NateBaldwinDesign May 23, 2022
6bc0f21
fix: adjustments to URL redirect to support urls without index.html (…
NateBaldwinDesign May 23, 2022
e48f5cd
Es6 (#166)
NateBaldwinDesign Aug 8, 2022
9924ad3
APCA support (#168)
NateBaldwinDesign Aug 9, 2022
e2e43b2
Apca UI parameters (#169)
NateBaldwinDesign Aug 9, 2022
1db2152
Bugfix apca (#170)
NateBaldwinDesign Aug 9, 2022
cbe29d3
fixed test for contrast (#171)
NateBaldwinDesign Aug 9, 2022
258ff4a
style: minor css fix
NateBaldwinDesign Aug 9, 2022
32ef5fb
chore(release): release
NateBaldwinDesign Aug 9, 2022
c8ef675
Added function to initiate theme with proper saturation if instantiat…
NateBaldwinDesign Aug 12, 2022
22fe9a9
chore(release): release
NateBaldwinDesign Aug 12, 2022
2251cde
Bulk contrast feature in conversion dialog (#183)
NateBaldwinDesign Nov 18, 2022
7a16c2b
fix: Make usage as commonjs and esm module work
dschmidt Nov 30, 2022
0bfd738
fix: Add dependencies of contrast colors
dschmidt Nov 30, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/---bug--npm-packages--.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: "\U0001F41B Bug [npm packages] "
about: Report a problem with the @leonardo-contrast-colors module
title: ''
labels: bug
assignees: ''

---

## Description
<!-- Describe the problem you're having -->


## Steps to reproduce
<!-- Include code examples or error messages if you have them -->


## Expected behavior
<!-- Describe what you expected to happen -->


## Screenshots
<!-- If applicable, add screenshots to help explain the problem -->

## Leonardo package and version
<!--ie: **@leonardo-contrast-colors version:** 2.13.0 -->


## Environment
- **Browser(s) and OS(s):** <!-- Chrome 75.0.3770.142 on Win 10 -->

## Additional context
<!-- Provide any additional information that might help us debug the issue -->
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/--bug-web-tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: "\U0001F41B Bug [Web Tool] "
about: Report a problem with the Leonardo web interface
title: ''
labels: UI, bug
assignees: ''

---

## Description
<!-- Describe the problem you're having -->


## Steps to reproduce

1. Go to http://leonardocolor.io/
2. Click on ...
3. Observe ...


## Expected behavior
<!-- Describe what you expected to happen -->


## Screenshots
<!-- If applicable, add screenshots to help explain the problem -->


## Environment
- **Browser(s) and OS(s):** <!-- Chrome 75.0.3770.142 on Win 10 -->

## Additional context
<!-- Provide any additional information that might help us debug the issue -->
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/--feature-request--npm-packages-.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: "✨ Feature request [npm packages]"
about: Suggest a new feature for the Leonardo npm modules
title: ''
labels: enhancement, npm packages
assignees: ''

---

## Description
<!-- Describe your suggested feature in detail -->


## Why do you need this feature?
<!-- Tell us what this solves or why this is important to your use case -->


## Leonardo package and version
<!--ie: **@leonardo-contrast-colors version:** 2.13.0 -->


## Additional context
<!-- Add any other context, workarounds, or screenshots about your request -->
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/--feature-web-tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: "✨ Feature request [Web Tool]"
about: Suggest a new feature for the Leonardo web interface
title: ''
labels: UI, enhancement
assignees: ''

---

## Description
<!-- Describe your suggested feature in detail -->


## Why do you need this feature?
<!-- Tell us what this solves or why this is important to your use case -->


## Additional context
<!-- Add any other context, workarounds, or screenshots about your request -->
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## Description
<!--
Note: Before sending a pull request, make sure there's an issue for what you're changing
- Search for issues: https://github.com/adobe/contrast/issues
- If there's no issue, file it: https://github.com/adobe/contrast/issues/new/choose
- Search for issues: https://github.com/adobe/leonardo/issues
- If there's no issue, file it: https://github.com/adobe/leonardo/issues/new/choose
-->
<!-- Describe what you changed and link to the relevant issue(s) -->

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ yarn-debug.log*
yarn-error.log*
.nyc_output/
.cache/
.DS_Store
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "packages/contrast-colors/SAPC-APCA"]
path = packages/contrast-colors/SAPC-APCA
url = [email protected]:Myndex/SAPC-APCA.git
[submodule "packages/ui/src/c3"]
path = packages/ui/src/c3
url = [email protected]:StanfordHCI/c3.git
49 changes: 43 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
![Leonardo logo](.github/Leonardo_Logo.png)

[![npm version](https://badge.fury.io/js/%40adobe%2Fleonardo-contrast-colors.svg)](https://www.npmjs.com/package/@adobe/leonardo-contrast-colors)
[![Package size](https://badgen.net/packagephobia/publish/@adobe/leonardo-contrast-colors)](https://packagephobia.com/result?p=%40adobe%2Fleonardo-contrast-colors)
[![Minified size](https://badgen.net/bundlephobia/min/@adobe/leonardo-contrast-colors)](https://bundlephobia.com/package/@adobe/leonardo-contrast-colors)
[![Minified and gzipped size](https://badgen.net/bundlephobia/minzip/@adobe/leonardo-contrast-colors)](https://bundlephobia.com/package/@adobe/leonardo-contrast-colors)
[![license](https://img.shields.io/github/license/adobe/leonardo)](https://github.com/adobe/leonardo/blob/master/LICENSE)
[![Pull requests welcome](https://img.shields.io/badge/PRs-welcome-blueviolet)](https://github.com/adobe/leonardo/blob/master/.github/CONTRIBUTING.md) [![Web UI](https://img.shields.io/badge/web%20tool-leonardocolor.io-blue)](https://leonardocolor.io)

# Leonardo
Authoring [adaptive color palettes](#what-is-adaptive-color) for generating color based on a desired contrast ratio.

Expand All @@ -8,15 +15,14 @@ For a detailed walkthrough of Leonardo, [check out this article](https://medium.
## 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](https://www.w3.org/TR/WCAG21/#contrast-minimum) by using contrast ratio as the starting point, rather than a post-color-selection auditing process.

1. [Leonardo web application](leonardo-web-application)
1. [Leonardo web application](#leonardo-web-application)
2. [Show me a demo](#show-me-a-demo)
3. [What is "adaptive color"?](#what-is-adaptive-color)
4. [Using Leonardo](#using-leonardo)
5. [API Reference](#api-reference)
6. [Why are not all contrast ratios available?](#why-are-not-all-contrast-ratios-available)
7. [D3 Color](#d3-color)
8. [Contributing](#contributing)
9. [Licensing](#licensing)
5. [Why are not all contrast ratios available?](#why-are-not-all-contrast-ratios-available)
6. [D3 Color](#d3-color)
7. [Contributing](#contributing)
8. [Licensing](#licensing)


## Leonardo web application
Expand Down Expand Up @@ -67,5 +73,36 @@ The Leonardo web app leverages d3 for additional features such as generating 2d
## Contributing
Contributions are welcomed! Read the [Contributing Guide](./.github/CONTRIBUTING.md) for more information.

## Development

To get started [developing Leonardo UI](packages/ui#development):

*Note: [Yarn](https://yarnpkg.com/) must be installed on your machine*

```sh
# 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](packages/contrast-colors#development):

```sh
# 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](LICENSE) for more information.
14 changes: 14 additions & 0 deletions cssnano.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
preset: [
"default",
{
svgo: {
plugins: [
{
convertStyleToAttrs: false
}
]
}
}
]
};
Loading