MCPcopy Create free account
hub / github.com/adobe/leonardo / SequentialScale

Class SequentialScale

docs/ui/src/js/initialSequentialScale.js:19–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17extendChroma(chroma);
18
19class SequentialScale {
20 constructor({swatches, colorKeys, colorSpace, smooth, distributeLightness = 'linear', shift, output}) {
21 this._swatches = swatches;
22 this._colorKeys = colorKeys;
23 this._luminosities = this._getLuminosities();
24 this._colorspace = colorSpace;
25 this._shift = shift;
26 this._smooth = smooth;
27 this._distributeLightness = distributeLightness;
28 this._output = output;
29 this._colors = this._createColorScale();
30 this._domains = this._getDomains();
31 }
32
33 set colorKeys(colors) {
34 this._colorKeys = colors;
35 this._colors = null;
36 this._colorsReversed = null;
37 this._colors = this._createColorScale();
38 this._luminosities = this._getLuminosities();
39 this._domains = this._getDomains();
40 }
41
42 get colorKeys() {
43 return this._colorKeys;
44 }
45
46 set samples(samples) {
47 this._samples = samples;
48 }
49
50 get samples() {
51 return this._samples;
52 }
53
54 set colorSpace(colorSpace) {
55 this._colorspace = colorSpace;
56 this._colors = null;
57 this._colorsReversed = null;
58 this._colors = this._createColorScale();
59 }
60
61 get colorSpace() {
62 return this._colorspace;
63 }
64
65 set smooth(smooth) {
66 this._smooth = smooth;
67 this._colors = null;
68 this._colorsReversed = null;
69 this._colors = this._createColorScale();
70 }
71
72 get smooth() {
73 return this._smooth;
74 }
75
76 set distributeLightness(setting) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected