Gradient Examples
These examples are equivalent to building an array of blended colors.
let scheme: Color.hex[] = Color.from('hex', 'ee2288')
.scheme('gradient', {
with: Color.from('114488'),
method: /* methods listed below */,
colors: 10
})
gradient
hsl
hsl:{"h":330,"s":86,"l":53,"a":100}hsl:{"h":317,"s":85,"l":51,"a":100}hsl:{"h":304,"s":84,"l":48,"a":100}hsl:{"h":291,"s":83,"l":46,"a":100}hsl:{"h":278,"s":82,"l":43,"a":100}hsl:{"h":266,"s":82,"l":40,"a":100}hsl:{"h":253,"s":80,"l":38,"a":100}hsl:{"h":240,"s":80,"l":35,"a":100}hsl:{"h":227,"s":78,"l":33,"a":100}hsl:{"h":214,"s":78,"l":30,"a":100}gradient
hsp
hsp:{"h":330,"s":86,"p":55,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":317,"s":86,"p":52,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":304,"s":86,"p":49,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":291,"s":86,"p":46,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":279,"s":87,"p":43,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":266,"s":87,"p":40,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":253,"s":87,"p":37,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":240,"s":87,"p":34,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":227,"s":87,"p":30,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":214,"s":88,"p":27,"a":100,"pb":0.114,"pr":0.299}gradient
rgb
rgb:{"r":238,"g":34,"b":136,"a":255,"bitDepth":8}rgb:{"r":213,"g":38,"b":136,"a":255,"bitDepth":8}rgb:{"r":189,"g":42,"b":136,"a":255,"bitDepth":8}rgb:{"r":164,"g":45,"b":136,"a":255,"bitDepth":8}rgb:{"r":140,"g":49,"b":136,"a":255,"bitDepth":8}rgb:{"r":115,"g":53,"b":136,"a":255,"bitDepth":8}rgb:{"r":91,"g":57,"b":136,"a":255,"bitDepth":8}rgb:{"r":66,"g":60,"b":136,"a":255,"bitDepth":8}rgb:{"r":42,"g":64,"b":136,"a":255,"bitDepth":8}rgb:{"r":17,"g":68,"b":136,"a":255,"bitDepth":8}gradient
lab
lab:{"l":53,"a":78,"b":-4}lab:{"l":51,"a":70,"b":-8}lab:{"l":48,"a":63,"b":-12}lab:{"l":45,"a":56,"b":-17}lab:{"l":42,"a":48,"b":-21}lab:{"l":40,"a":41,"b":-25}lab:{"l":37,"a":33,"b":-30}lab:{"l":35,"a":26,"b":-34}lab:{"l":32,"a":18,"b":-38}lab:{"l":29,"a":11,"b":-43}gradient
hue
rgb:{"r":238,"g":34,"b":136,"a":255,"bitDepth":8}rgb:{"r":238,"g":34,"b":175,"a":255,"bitDepth":8}rgb:{"r":238,"g":34,"b":215,"a":255,"bitDepth":8}rgb:{"r":222,"g":34,"b":238,"a":255,"bitDepth":8}rgb:{"r":183,"g":34,"b":238,"a":255,"bitDepth":8}rgb:{"r":143,"g":34,"b":238,"a":255,"bitDepth":8}rgb:{"r":104,"g":34,"b":238,"a":255,"bitDepth":8}rgb:{"r":65,"g":34,"b":238,"a":255,"bitDepth":8}rgb:{"r":34,"g":43,"b":238,"a":255,"bitDepth":8}rgb:{"r":34,"g":82,"b":238,"a":255,"bitDepth":8}gradient
intensity
rgb:{"r":238,"g":34,"b":136,"a":255,"bitDepth":8}rgb:{"r":227,"g":32,"b":130,"a":255,"bitDepth":8}rgb:{"r":216,"g":31,"b":124,"a":255,"bitDepth":8}rgb:{"r":205,"g":29,"b":117,"a":255,"bitDepth":8}rgb:{"r":194,"g":28,"b":111,"a":255,"bitDepth":8}rgb:{"r":183,"g":26,"b":105,"a":255,"bitDepth":8}rgb:{"r":173,"g":25,"b":99,"a":255,"bitDepth":8}rgb:{"r":162,"g":23,"b":92,"a":255,"bitDepth":8}rgb:{"r":151,"g":22,"b":86,"a":255,"bitDepth":8}rgb:{"r":140,"g":20,"b":80,"a":255,"bitDepth":8}gradient
multiply
rgb:{"r":238,"g":34,"b":136,"a":255,"bitDepth":8}rgb:{"r":216,"g":32,"b":130,"a":255,"bitDepth":8}rgb:{"r":194,"g":29,"b":123,"a":255,"bitDepth":8}rgb:{"r":171,"g":27,"b":117,"a":255,"bitDepth":8}rgb:{"r":149,"g":24,"b":111,"a":255,"bitDepth":8}rgb:{"r":127,"g":22,"b":104,"a":255,"bitDepth":8}rgb:{"r":105,"g":19,"b":98,"a":255,"bitDepth":8}rgb:{"r":83,"g":17,"b":92,"a":255,"bitDepth":8}rgb:{"r":60,"g":14,"b":85,"a":255,"bitDepth":8}rgb:{"r":38,"g":12,"b":79,"a":255,"bitDepth":8}gradient
colordodge
rgb:{"r":238,"g":34,"b":136,"a":255,"bitDepth":8}rgb:{"r":240,"g":35,"b":148,"a":255,"bitDepth":8}rgb:{"r":241,"g":36,"b":160,"a":255,"bitDepth":8}rgb:{"r":243,"g":38,"b":172,"a":255,"bitDepth":8}rgb:{"r":245,"g":39,"b":184,"a":255,"bitDepth":8}rgb:{"r":247,"g":40,"b":196,"a":255,"bitDepth":8}rgb:{"r":248,"g":41,"b":207,"a":255,"bitDepth":8}rgb:{"r":250,"g":43,"b":219,"a":255,"bitDepth":8}rgb:{"r":252,"g":44,"b":231,"a":255,"bitDepth":8}rgb:{"r":253,"g":45,"b":243,"a":255,"bitDepth":8}gradient
difference
rgb:{"r":238,"g":34,"b":136,"a":255,"bitDepth":8}rgb:{"r":236,"g":34,"b":122,"a":255,"bitDepth":8}rgb:{"r":235,"g":34,"b":109,"a":255,"bitDepth":8}rgb:{"r":233,"g":34,"b":95,"a":255,"bitDepth":8}rgb:{"r":231,"g":34,"b":82,"a":255,"bitDepth":8}rgb:{"r":230,"g":34,"b":68,"a":255,"bitDepth":8}rgb:{"r":228,"g":34,"b":54,"a":255,"bitDepth":8}rgb:{"r":226,"g":34,"b":41,"a":255,"bitDepth":8}rgb:{"r":224,"g":34,"b":27,"a":255,"bitDepth":8}rgb:{"r":223,"g":34,"b":14,"a":255,"bitDepth":8}let scheme: Color.hex[] = Color.from('hex', '445566')
.scheme('gradient', {
with: Color.from('ff2255'),
method: /* methods listed below */,
colors: 10
})
gradient
hsl
hsl:{"h":210,"s":20,"l":33,"a":100}hsl:{"h":225,"s":29,"l":36,"a":100}hsl:{"h":240,"s":38,"l":38,"a":100}hsl:{"h":255,"s":47,"l":41,"a":100}hsl:{"h":271,"s":55,"l":44,"a":100}hsl:{"h":286,"s":64,"l":46,"a":100}hsl:{"h":301,"s":73,"l":49,"a":100}hsl:{"h":316,"s":82,"l":52,"a":100}hsl:{"h":331,"s":91,"l":54,"a":100}hsl:{"h":346,"s":100,"l":57,"a":100}gradient
hsp
hsp:{"h":210,"s":33,"p":32,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":225,"s":39,"p":35,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":240,"s":45,"p":38,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":255,"s":51,"p":40,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":271,"s":57,"p":43,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":285,"s":63,"p":46,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":300,"s":69,"p":49,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":316,"s":75,"p":51,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":331,"s":81,"p":54,"a":100,"pb":0.114,"pr":0.299}hsp:{"h":346,"s":87,"p":57,"a":100,"pb":0.114,"pr":0.299}gradient
rgb
rgb:{"r":68,"g":85,"b":102,"a":255,"bitDepth":8}rgb:{"r":89,"g":79,"b":100,"a":255,"bitDepth":8}rgb:{"r":110,"g":74,"b":98,"a":255,"bitDepth":8}rgb:{"r":130,"g":68,"b":96,"a":255,"bitDepth":8}rgb:{"r":151,"g":62,"b":94,"a":255,"bitDepth":8}rgb:{"r":172,"g":57,"b":93,"a":255,"bitDepth":8}rgb:{"r":193,"g":51,"b":91,"a":255,"bitDepth":8}rgb:{"r":213,"g":45,"b":89,"a":255,"bitDepth":8}rgb:{"r":234,"g":40,"b":87,"a":255,"bitDepth":8}rgb:{"r":255,"g":34,"b":85,"a":255,"bitDepth":8}gradient
lab
lab:{"l":35,"a":-2,"b":-12}lab:{"l":37,"a":7,"b":-7}lab:{"l":40,"a":15,"b":-2}lab:{"l":42,"a":25,"b":2}lab:{"l":44,"a":33,"b":7}lab:{"l":46,"a":43,"b":11}lab:{"l":49,"a":52,"b":16}lab:{"l":51,"a":61,"b":21}lab:{"l":53,"a":70,"b":25}lab:{"l":55,"a":79,"b":30}gradient
hue
rgb:{"r":68,"g":85,"b":102,"a":255,"bitDepth":8}rgb:{"r":68,"g":77,"b":102,"a":255,"bitDepth":8}rgb:{"r":68,"g":70,"b":102,"a":255,"bitDepth":8}rgb:{"r":74,"g":68,"b":102,"a":255,"bitDepth":8}rgb:{"r":82,"g":68,"b":102,"a":255,"bitDepth":8}rgb:{"r":90,"g":68,"b":102,"a":255,"bitDepth":8}rgb:{"r":97,"g":68,"b":102,"a":255,"bitDepth":8}rgb:{"r":102,"g":68,"b":99,"a":255,"bitDepth":8}rgb:{"r":102,"g":68,"b":91,"a":255,"bitDepth":8}rgb:{"r":102,"g":68,"b":84,"a":255,"bitDepth":8}gradient
intensity
rgb:{"r":68,"g":85,"b":102,"a":255,"bitDepth":8}rgb:{"r":71,"g":89,"b":107,"a":255,"bitDepth":8}rgb:{"r":74,"g":93,"b":112,"a":255,"bitDepth":8}rgb:{"r":78,"g":97,"b":116,"a":255,"bitDepth":8}rgb:{"r":81,"g":101,"b":121,"a":255,"bitDepth":8}rgb:{"r":84,"g":105,"b":126,"a":255,"bitDepth":8}rgb:{"r":87,"g":109,"b":131,"a":255,"bitDepth":8}rgb:{"r":90,"g":113,"b":135,"a":255,"bitDepth":8}rgb:{"r":93,"g":117,"b":140,"a":255,"bitDepth":8}rgb:{"r":97,"g":121,"b":145,"a":255,"bitDepth":8}gradient
multiply
rgb:{"r":68,"g":85,"b":102,"a":255,"bitDepth":8}rgb:{"r":68,"g":78,"b":95,"a":255,"bitDepth":8}rgb:{"r":68,"g":70,"b":88,"a":255,"bitDepth":8}rgb:{"r":68,"g":63,"b":82,"a":255,"bitDepth":8}rgb:{"r":68,"g":56,"b":75,"a":255,"bitDepth":8}rgb:{"r":68,"g":48,"b":68,"a":255,"bitDepth":8}rgb:{"r":68,"g":41,"b":61,"a":255,"bitDepth":8}rgb:{"r":68,"g":33,"b":54,"a":255,"bitDepth":8}rgb:{"r":68,"g":26,"b":48,"a":255,"bitDepth":8}rgb:{"r":68,"g":19,"b":41,"a":255,"bitDepth":8}gradient
colordodge
rgb:{"r":68,"g":85,"b":102,"a":255,"bitDepth":8}rgb:{"r":87,"g":86,"b":107,"a":255,"bitDepth":8}rgb:{"r":105,"g":88,"b":112,"a":255,"bitDepth":8}rgb:{"r":124,"g":89,"b":117,"a":255,"bitDepth":8}rgb:{"r":143,"g":90,"b":122,"a":255,"bitDepth":8}rgb:{"r":162,"g":92,"b":128,"a":255,"bitDepth":8}rgb:{"r":180,"g":93,"b":133,"a":255,"bitDepth":8}rgb:{"r":199,"g":94,"b":138,"a":255,"bitDepth":8}rgb:{"r":218,"g":95,"b":143,"a":255,"bitDepth":8}rgb:{"r":236,"g":97,"b":148,"a":255,"bitDepth":8}gradient
difference
rgb:{"r":68,"g":85,"b":102,"a":255,"bitDepth":8}rgb:{"r":80,"g":82,"b":94,"a":255,"bitDepth":8}rgb:{"r":92,"g":78,"b":85,"a":255,"bitDepth":8}rgb:{"r":104,"g":75,"b":77,"a":255,"bitDepth":8}rgb:{"r":116,"g":71,"b":68,"a":255,"bitDepth":8}rgb:{"r":128,"g":68,"b":60,"a":255,"bitDepth":8}rgb:{"r":139,"g":65,"b":51,"a":255,"bitDepth":8}rgb:{"r":151,"g":61,"b":43,"a":255,"bitDepth":8}rgb:{"r":163,"g":58,"b":34,"a":255,"bitDepth":8}rgb:{"r":175,"g":54,"b":26,"a":255,"bitDepth":8}let scheme: Color.hex[] = Color.from('hex', 'ee8822')
.scheme('gradient', {
with: Color.from('118844'),
method: /* methods listed below */,
colors: 10
})