adobe / leonardo

Generate colors based on a desired contrast ratio
http://www.leonardocolor.io
Apache License 2.0
1.96k stars 107 forks source link

Theme saturation #139

Closed NateBaldwinDesign closed 3 years ago

NateBaldwinDesign commented 3 years ago

Description

Fixes #138

updateColor setter accepts an object with two key-value pairs. The first is the name of the color to be modified. The second is the property to update and the value you wish to update it to.

let color = new Color({
  name: 'Red',
  colorKeys: ['#ff0000', '#ff3200'],
  ratios: [3, 4, 5]
});
let theme = new Theme ({
 colors: [color]
 backgroundColor: '#f5f5f5'
});

theme.updateColor = {name: 'Red', ratios: [4.5, 7, 9]}

Motivation

Screenshots

To-do list