From 446a285269052c69369abdc27c204e7c9ae59546 Mon Sep 17 00:00:00 2001 From: Lars van Vianen Date: Sun, 4 Feb 2024 17:34:10 +0100 Subject: [PATCH] v0.0.11 --- VERSION | 2 +- bin/js/hue/color/ColorSwatch.js.map | 2 +- bin/js/index.js | 4 +- bin/js/index.js.map | 2 +- bin/ts/hue/color/ColorSwatch.ts | 1 - bin/ts/index.ts | 7 +- dist/js/color/ColorPicker.d.ts | 11 + dist/js/color/ColorPicker.js | 53 +++ dist/js/color/ColorScheme.d.ts | 23 ++ dist/js/color/ColorScheme.js | 90 +++++ dist/js/color/ColorSwatch.d.ts | 54 +++ dist/js/color/ColorSwatch.js | 258 +++++++++++++ dist/js/color/index.d.ts | 3 + dist/js/color/index.js | 19 + dist/js/config/hue.config.d.ts | 11 + dist/js/config/hue.config.js | 28 ++ dist/js/config/hue.names.d.ts | 27 ++ dist/js/config/hue.names.js | 44 +++ dist/js/config/index.d.ts | 2 + dist/js/config/index.js | 17 + dist/js/constants/hue_hcl.d.ts | 227 +++++++++++ dist/js/constants/hue_hcl.js | 299 +++++++++++++++ dist/js/constants/hue_hex.d.ts | 227 +++++++++++ dist/js/constants/hue_hex.js | 299 +++++++++++++++ dist/js/constants/hue_rgb.d.ts | 227 +++++++++++ dist/js/constants/hue_rgb.js | 299 +++++++++++++++ dist/js/constants/index.d.ts | 3 + dist/js/constants/index.js | 19 + dist/js/hue.gl.min.js | 2 +- dist/js/index.d.ts | 4 +- dist/js/index.js | 23 +- dist/js/util.d.ts | 11 + dist/js/util.js | 47 +++ dist/package.json | 2 +- dist/py/hue.gl.py | 2 +- dist/rcpx/hue.gl.rcpx | 2 +- dist/scss/hue/_hue.gl-hcl-map.scss | 2 +- dist/scss/hue/_hue.gl-hcl-var.scss | 2 +- dist/scss/hue/_hue.gl-hex-map.scss | 2 +- dist/scss/hue/_hue.gl-hex-var.scss | 2 +- dist/scss/hue/_hue.gl-rgb-map.scss | 2 +- dist/scss/hue/_hue.gl-rgb-var.scss | 2 +- dist/styl/hue.gl.styl | 2 +- dist/tex/hue.gl.tex | 2 +- dist/ts/color/ColorPicker.ts | 75 ++++ dist/ts/color/ColorScheme.ts | 126 +++++++ dist/ts/color/ColorSwatch.ts | 327 ++++++++++++++++ dist/ts/color/index.ts | 18 + dist/ts/{hue.gl.d.ts => config/hue.config.ts} | 23 +- dist/ts/config/hue.names.ts | 48 +++ dist/ts/config/index.ts | 18 + dist/ts/constants/hue_hcl.ts | 356 ++++++++++++++++++ dist/ts/constants/hue_hex.ts | 356 ++++++++++++++++++ dist/ts/constants/hue_rgb.ts | 356 ++++++++++++++++++ dist/ts/constants/index.ts | 18 + dist/ts/index.ts | 21 +- dist/ts/util.ts | 52 +++ package.json | 2 +- src/jinja/hue.gl-hcl-enum.ts.jinja | 40 ++ src/jinja/hue.gl-hex-enum.ts.jinja | 40 ++ src/jinja/hue.gl-rgb-enum.ts.jinja | 40 ++ src/scss/hue/_hue.gl-hcl-map.scss | 2 +- src/scss/hue/_hue.gl-hcl-var.scss | 2 +- src/scss/hue/_hue.gl-hex-map.scss | 2 +- src/scss/hue/_hue.gl-hex-var.scss | 2 +- src/scss/hue/_hue.gl-rgb-map.scss | 2 +- src/scss/hue/_hue.gl-rgb-var.scss | 2 +- src/ts/color/ColorPicker.ts | 75 ++++ src/ts/color/ColorScheme.ts | 126 +++++++ src/ts/color/ColorSwatch.ts | 327 ++++++++++++++++ src/ts/color/index.ts | 18 + src/ts/config/hue.config.ts | 35 ++ src/ts/config/hue.names.ts | 48 +++ src/ts/config/index.ts | 18 + src/ts/constants/hue_hcl.ts | 356 ++++++++++++++++++ src/ts/constants/hue_hex.ts | 356 ++++++++++++++++++ src/ts/constants/hue_rgb.ts | 356 ++++++++++++++++++ src/ts/constants/index.ts | 18 + src/ts/index.ts | 21 +- src/ts/util.ts | 52 +++ 80 files changed, 6064 insertions(+), 37 deletions(-) create mode 100644 dist/js/color/ColorPicker.d.ts create mode 100644 dist/js/color/ColorPicker.js create mode 100644 dist/js/color/ColorScheme.d.ts create mode 100644 dist/js/color/ColorScheme.js create mode 100644 dist/js/color/ColorSwatch.d.ts create mode 100644 dist/js/color/ColorSwatch.js create mode 100644 dist/js/color/index.d.ts create mode 100644 dist/js/color/index.js create mode 100644 dist/js/config/hue.config.d.ts create mode 100644 dist/js/config/hue.config.js create mode 100644 dist/js/config/hue.names.d.ts create mode 100644 dist/js/config/hue.names.js create mode 100644 dist/js/config/index.d.ts create mode 100644 dist/js/config/index.js create mode 100644 dist/js/constants/hue_hcl.d.ts create mode 100644 dist/js/constants/hue_hcl.js create mode 100644 dist/js/constants/hue_hex.d.ts create mode 100644 dist/js/constants/hue_hex.js create mode 100644 dist/js/constants/hue_rgb.d.ts create mode 100644 dist/js/constants/hue_rgb.js create mode 100644 dist/js/constants/index.d.ts create mode 100644 dist/js/constants/index.js create mode 100644 dist/js/util.d.ts create mode 100644 dist/js/util.js create mode 100644 dist/ts/color/ColorPicker.ts create mode 100644 dist/ts/color/ColorScheme.ts create mode 100644 dist/ts/color/ColorSwatch.ts create mode 100644 dist/ts/color/index.ts rename dist/ts/{hue.gl.d.ts => config/hue.config.ts} (74%) create mode 100644 dist/ts/config/hue.names.ts create mode 100644 dist/ts/config/index.ts create mode 100644 dist/ts/constants/hue_hcl.ts create mode 100644 dist/ts/constants/hue_hex.ts create mode 100644 dist/ts/constants/hue_rgb.ts create mode 100644 dist/ts/constants/index.ts create mode 100644 dist/ts/util.ts create mode 100644 src/jinja/hue.gl-hcl-enum.ts.jinja create mode 100644 src/jinja/hue.gl-hex-enum.ts.jinja create mode 100644 src/jinja/hue.gl-rgb-enum.ts.jinja create mode 100644 src/ts/color/ColorPicker.ts create mode 100644 src/ts/color/ColorScheme.ts create mode 100644 src/ts/color/ColorSwatch.ts create mode 100644 src/ts/color/index.ts create mode 100644 src/ts/config/hue.config.ts create mode 100644 src/ts/config/hue.names.ts create mode 100644 src/ts/config/index.ts create mode 100644 src/ts/constants/hue_hcl.ts create mode 100644 src/ts/constants/hue_hex.ts create mode 100644 src/ts/constants/hue_rgb.ts create mode 100644 src/ts/constants/index.ts create mode 100644 src/ts/util.ts diff --git a/VERSION b/VERSION index b0a1227..58682af 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.10 \ No newline at end of file +0.0.11 \ No newline at end of file diff --git a/bin/js/hue/color/ColorSwatch.js.map b/bin/js/hue/color/ColorSwatch.js.map index fead23a..ff58409 100644 --- a/bin/js/hue/color/ColorSwatch.js.map +++ b/bin/js/hue/color/ColorSwatch.js.map @@ -1 +1 @@ -{"version":3,"file":"ColorSwatch.js","sourceRoot":"","sources":["../../../ts/hue/color/ColorSwatch.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAY,eAAe,EAAE,MAAM,YAAY,CAAC;AAOvD,MAAM,WAAW;IAOb,YAAY,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,IAAa;QALlD,MAAC,GAAW,CAAC,CAAC;QACd,MAAC,GAAW,CAAC,CAAC;QACd,MAAC,GAAW,CAAC,CAAC;QAIlB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;YAC3D,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC1C,CAAC;QACD,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QAEX,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAI,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAAA,CAAC;IAC/C,CAAC;IAED,MAAM,CAAC,CAAS,EAAE,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ef3aa 100644 --- a/bin/js/index.js +++ b/bin/js/index.js @@ -61,7 +61,9 @@ function main() { yield templater.generateToFile('hue.gl-hcl-var.scss.jinja', path.join(CONFIG.path.src, 'scss', 'hue', '_hue.gl-hcl-var.scss')); yield templater.generateToFile('hue.gl-hex-map.scss.jinja', path.join(CONFIG.path.src, 'scss', 'hue', '_hue.gl-hex-map.scss')); yield templater.generateToFile('hue.gl-hex-var.scss.jinja', path.join(CONFIG.path.src, 'scss', 'hue', '_hue.gl-hex-var.scss')); - yield templater.generateToFile('hue.gl.d.ts.jinja', path.join(CONFIG.path.dist, 'ts', 'hue.gl.d.ts')); + yield templater.generateToFile('hue.gl-hcl-enum.ts.jinja', path.join(CONFIG.path.ts_input, 'constants', 'hue_hcl.ts')); + yield templater.generateToFile('hue.gl-hex-enum.ts.jinja', path.join(CONFIG.path.ts_input, 'constants', 'hue_hex.ts')); + yield templater.generateToFile('hue.gl-rgb-enum.ts.jinja', path.join(CONFIG.path.ts_input, 'constants', 'hue_rgb.ts')); yield templater.generateToFile('hue.gl.js.jinja', path.join(CONFIG.path.dist, 'js', 'hue.gl.js')); for (const groupName in color_dict) { if (color_dict.hasOwnProperty(groupName)) { diff --git a/bin/js/index.js.map b/bin/js/index.js.map index 30451fa..4778794 100644 --- a/bin/js/index.js.map +++ b/bin/js/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":";AAsBA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,cAAc,EACd,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,iBAAiB,EAEjB,eAAe,GAClB,MAAM,SAAS,CAAC;AAEjB,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,QAAQ,MAAM,2BAA2B,CAAA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AAI,kBAAkB,EAAE,CAAC;YAC5C,MAAM,UAAU,CAAC,UAAU,CACvB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EAC5C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,aAAa,CAAC,IAAI,SAAS,CAAC,CACnE;iBACA,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;iBAC7D,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAG1B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;QAC/C,CAAC;IAEL,CAAC;CAAA;AAQD,IAAI,EAAE,CAAC"} \ No newline at end of file diff --git a/bin/ts/hue/color/ColorSwatch.ts b/bin/ts/hue/color/ColorSwatch.ts index 15eeed1..bd7a3d8 100644 --- a/bin/ts/hue/color/ColorSwatch.ts +++ b/bin/ts/hue/color/ColorSwatch.ts @@ -1,4 +1,3 @@ -// script/class/class/DirectoryCleaner.ts // Copyright 2023 Scape Agency BV diff --git a/bin/ts/index.ts b/bin/ts/index.ts index 49bc840..46a9d7c 100644 --- a/bin/ts/index.ts +++ b/bin/ts/index.ts @@ -151,7 +151,12 @@ async function main() { await templater.generateToFile('hue.gl-hex-var.scss.jinja', path.join(CONFIG.path.src, 'scss', 'hue', '_hue.gl-hex-var.scss')); - await templater.generateToFile('hue.gl.d.ts.jinja', path.join(CONFIG.path.dist, 'ts', 'hue.gl.d.ts')); + // await templater.generateToFile('hue.gl.d.ts.jinja', path.join(CONFIG.path.dist, 'ts', 'hue.gl.d.ts')); + await templater.generateToFile('hue.gl-hcl-enum.ts.jinja', path.join(CONFIG.path.ts_input, 'constants', 'hue_hcl.ts')); + await templater.generateToFile('hue.gl-hex-enum.ts.jinja', path.join(CONFIG.path.ts_input, 'constants', 'hue_hex.ts')); + await templater.generateToFile('hue.gl-rgb-enum.ts.jinja', path.join(CONFIG.path.ts_input, 'constants', 'hue_rgb.ts')); + + // await templater.generateToFile('hue.gl.css.jinja', path.join(CONFIG.path.dist, 'css', 'hue.gl.css')); await templater.generateToFile('hue.gl.js.jinja', path.join(CONFIG.path.dist, 'js', 'hue.gl.js')); diff --git a/dist/js/color/ColorPicker.d.ts b/dist/js/color/ColorPicker.d.ts new file mode 100644 index 0000000..6ed79e9 --- /dev/null +++ b/dist/js/color/ColorPicker.d.ts @@ -0,0 +1,11 @@ +type ColorEnum = 'RGB' | 'HSL' | 'HCL' | 'HEX'; +export declare class ColorPicker { + /** + * Retrieves a color value by its enum key. + * @param colorEnum The enum type ('RGB' or 'HSL') to pick the color from. + * @param colorKey The key of the color in the specified enum. + * @returns The color value or null if the key does not exist in the specified enum. + */ + static get(colorEnum: ColorEnum, colorKey: string): string | null; +} +export {}; diff --git a/dist/js/color/ColorPicker.js b/dist/js/color/ColorPicker.js new file mode 100644 index 0000000..b966181 --- /dev/null +++ b/dist/js/color/ColorPicker.js @@ -0,0 +1,53 @@ +"use strict"; +// script/class/class/DirectoryCleaner.ts +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ColorPicker = void 0; +// Copyright 2023 Scape Agency BV +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ============================================================================ +// Import +// ============================================================================ +var constants_1 = require("../constants"); +// ============================================================================ +// Classes +// ============================================================================ +class ColorPicker { + /** + * Retrieves a color value by its enum key. + * @param colorEnum The enum type ('RGB' or 'HSL') to pick the color from. + * @param colorKey The key of the color in the specified enum. + * @returns The color value or null if the key does not exist in the specified enum. + */ + static get(colorEnum, colorKey) { + let color; + switch (colorEnum) { + case 'RGB': + // color = hue_rgb[colorKey as keyof typeof hue_rgb]; + return constants_1.hue_rgb[colorKey] || null; + // break; + case 'HCL': + // color = hue_hcl[colorKey as keyof typeof hue_hcl]; + return constants_1.hue_hcl[colorKey] || null; + // break; + case 'HEX': + // color = hue_hex[colorKey as keyof typeof hue_hex]; + return constants_1.hue_hex[colorKey] || null; + // break; + default: + return null; + } + // return color || null; + } +} +exports.ColorPicker = ColorPicker; +// Usage examples +// const specificRGBColor = ColorPicker.getColor('RGB', 'N0001'); // Should return "rgb(0, 0, 90)" or similar +// console.log(specificRGBColor); // Outputs: rgb(0, 0, 90) or similar diff --git a/dist/js/color/ColorScheme.d.ts b/dist/js/color/ColorScheme.d.ts new file mode 100644 index 0000000..68aa390 --- /dev/null +++ b/dist/js/color/ColorScheme.d.ts @@ -0,0 +1,23 @@ +import { ColorSwatch } from './ColorSwatch.js'; +type ColorSchemeConfig = { + prefix?: string; + h_step?: number; + p_count?: number; + l_l_min?: number; + l_l_step?: number; + d_l_step?: number; + l_c_min?: number; + l_c_step?: number; + d_c_step?: number; +}; +export declare class ColorScheme { + config: ColorSchemeConfig | any; + names: any; + colorList: ColorSwatch[]; + colorDict: Record>; + constructor(config: ColorSchemeConfig, names: any); + private initializeColors; + getColorList(): ColorSwatch[]; + getColorDict(): Record>; +} +export {}; diff --git a/dist/js/color/ColorScheme.js b/dist/js/color/ColorScheme.js new file mode 100644 index 0000000..665f44c --- /dev/null +++ b/dist/js/color/ColorScheme.js @@ -0,0 +1,90 @@ +"use strict"; +// script/class/class/DirectoryCleaner.ts +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ColorScheme = void 0; +// Copyright 2023 Scape Agency BV +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ============================================================================ +// Import +// ============================================================================ +var ColorSwatch_js_1 = require("./ColorSwatch.js"); +var util_js_1 = require("../util.js"); +// ============================================================================ +// Classes +// ============================================================================ +class ColorScheme { + constructor(config, names) { + // Initialize colorList and other properties based on config + this.config = config; + this.names = names; + this.colorList = []; + this.colorDict = {}; + this.initializeColors(); + } + initializeColors() { + // Logic to initialize colorList based on the provided configuration + const l_count = Math.ceil(this.config.p_count / 2); + const d_count = Math.floor(this.config.p_count / 2); + const d_l_min = this.config.l_l_min + (this.config.l_l_step * (l_count - 1)); + const d_c_min = this.config.l_c_min + (this.config.l_c_step * (l_count - 1)); + // Create LC lists + // -------------------------------------------------------------------- + // const l_list = [0]; + // const c_list = [0]; + const l_list = []; + const c_list = []; + for (let i = 0; i < this.config.p_count; i++) { + let l_cur = this.config.l_l_min + this.config.l_l_step + i * this.config.l_l_step - 2 * i; + l_list.push(l_cur); + } + ; + for (let i = 0; i < l_count; i++) { + let c_cur = this.config.l_c_min + i * this.config.l_c_step; + c_list.push(c_cur); + } + ; + for (let i = 0; i < d_count; i++) { + let c_cur = d_c_min + this.config.d_c_step + i * this.config.d_c_step; + c_list.push(c_cur); + } + ; + // Create hue.gl + // -------------------------------------------------------------------- + // for (let h = this.config.h_step; h <= 360; h += this.config.h_step) { + for (let h = 0; h <= 360; h += this.config.h_step) { + let h_group = {}; + // let h_group_name = h.toString(); + let h_group_name = this.names[h]; + ; + for (let i = 0; i < this.config.p_count; i++) { + let l_cur = l_list[i]; + let c_cur = c_list[i]; + if (h == 0) { + c_cur = 0; + } + ; + let name = this.config.prefix + (0, util_js_1.pad)(h.toString(), 3, "0") + (i + 1).toString(); + let color = new ColorSwatch_js_1.ColorSwatch(h, c_cur, l_cur, name); + this.colorList.push(color); + h_group[name] = color; + } + ; + this.colorDict[h_group_name] = h_group; + } + } + getColorList() { + return this.colorList; + } + getColorDict() { + return this.colorDict; + } +} +exports.ColorScheme = ColorScheme; diff --git a/dist/js/color/ColorSwatch.d.ts b/dist/js/color/ColorSwatch.d.ts new file mode 100644 index 0000000..9813ff3 --- /dev/null +++ b/dist/js/color/ColorSwatch.d.ts @@ -0,0 +1,54 @@ +import Color from 'colorjs.io'; +export declare class ColorSwatch { + name?: string; + h: number; + c: number; + l: number; + model: Color; + constructor(h: number, c: number, l: number, name?: string); + setHCL(h: number, c: number, l: number): void; + checkGamut(color_constant: Color): boolean; + getName(): string | undefined; + getRGB(): [number, number, number]; + a98rgb(): import("colorjs.io/types/src/color.js").Coords; + a98rgb_linear(): import("colorjs.io/types/src/color.js").Coords; + acescg(): import("colorjs.io/types/src/color.js").Coords; + hsl(): import("colorjs.io/types/src/color.js").Coords; + hsv(): import("colorjs.io/types/src/color.js").Coords; + hwb(): import("colorjs.io/types/src/color.js").Coords; + ictcp(): import("colorjs.io/types/src/color.js").Coords; + jzczhz(): import("colorjs.io/types/src/color.js").Coords; + jzazbz(): import("colorjs.io/types/src/color.js").Coords; + lab(): import("colorjs.io/types/src/color.js").Coords; + lab_d65(): import("colorjs.io/types/src/color.js").Coords; + lch(): import("colorjs.io/types/src/color.js").Coords; + oklch(): import("colorjs.io/types/src/color.js").Coords; + oklab(): import("colorjs.io/types/src/color.js").Coords; + p3(): import("colorjs.io/types/src/color.js").Coords; + p3_linear(): import("colorjs.io/types/src/color.js").Coords; + prophoto(): import("colorjs.io/types/src/color.js").Coords; + prophoto_linear(): import("colorjs.io/types/src/color.js").Coords; + rec2020(): import("colorjs.io/types/src/color.js").Coords; + rec2020_linear(): import("colorjs.io/types/src/color.js").Coords; + rec2100hlg(): import("colorjs.io/types/src/color.js").Coords; + rec2100pq(): import("colorjs.io/types/src/color.js").Coords; + xyz_abs_d65(): import("colorjs.io/types/src/color.js").Coords; + xyz_d50(): import("colorjs.io/types/src/color.js").Coords; + xyz_d65(): import("colorjs.io/types/src/color.js").Coords; + xyz(): import("colorjs.io/types/src/color.js").Coords; + srgb(): Color; + srgb_linear(): import("colorjs.io/types/src/color.js").Coords; + hex(): string; + hcl(): { + h: number; + c: number; + l: number; + }; + rgb(): { + r: number; + g: number; + b: number; + }; + toString(): string; + toDict(): Record; +} diff --git a/dist/js/color/ColorSwatch.js b/dist/js/color/ColorSwatch.js new file mode 100644 index 0000000..d8df137 --- /dev/null +++ b/dist/js/color/ColorSwatch.js @@ -0,0 +1,258 @@ +"use strict"; +// Copyright 2023 Scape Agency BV +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ColorSwatch = void 0; +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ============================================================================ +// Import +// ============================================================================ +var colorjs_io_1 = __importDefault(require("colorjs.io")); +var util_js_1 = require("../util.js"); +// ============================================================================ +// Classes +// ============================================================================ +class ColorSwatch { + constructor(h, c, l, name) { + this.h = 0; // Hue (0-360) + this.c = 0; // Chroma (0-100) + this.l = 0; // Luminance (0-100) + if (h < 0 || h > 360 || c < 0 || c > 100 || l < 0 || l > 100) { + throw new Error("Invalid HCL values"); + } + this.h = h; + this.c = c; + this.l = l; + // this.setHCL(h, c, l); + this.name = name; + this.model = new colorjs_io_1.default("lch", [l, c, h]); + ; + } + setHCL(h, c, l) { + if (h < 0 || h > 360 || c < 0 || c > 100 || l < 0 || l > 100) { + throw new Error("Invalid HCL values"); + } + this.h = h; + this.c = c; + this.l = l; + } + /// Color Gamut Checks + checkGamut(color_constant) { + let lch_in_gamut = (color_constant.to("lch")).inGamut(); + let srgb_in_gamut = (color_constant.to("srgb")).inGamut(); + let argb_in_gamut = (color_constant.to("a98rgb")).inGamut(); + // console.log(argb_in_gamut); + let in_gamut; + if (lch_in_gamut == false || + srgb_in_gamut == false || + argb_in_gamut == false) { + in_gamut = false; + // color_object = new Color("white"); + } + else { + in_gamut = true; + } + return in_gamut; + } + getName() { + return this.name; + } + // HCL(): [number, number, number] { + // return [this.h, this.c, this.l]; + // } + getRGB() { + // const color_constant = new Color("lch", [l, c, h]); + // let color_object = color_constant + // Convert HCL to RGB here + // This is a non-trivial conversion and may require a detailed algorithm or library + // Placeholder for conversion logic + return [0, 0, 0]; // Replace with actual conversion logic + } + // Color Space Conversions + // ======================================================================== + a98rgb() { + let color = this.model.to("a98rgb"); + return color.coords; + } + a98rgb_linear() { + let color = this.model.to("a98rgb-linear"); + return color.coords; + } + acescg() { + let color = this.model.to("acescg"); + return color.coords; + } + hsl() { + let color = this.model.to("hsl"); + return color.coords; + } + hsv() { + let color = this.model.to("hsv"); + return color.coords; + } + hwb() { + let color = this.model.to("hwb"); + return color.coords; + } + ictcp() { + let color = this.model.to("ictcp"); + return color.coords; + } + jzczhz() { + let color = this.model.to("jzczhz"); + return color.coords; + } + jzazbz() { + let color = this.model.to("jzazbz"); + return color.coords; + } + lab() { + let color = this.model.to("lab"); + return color.coords; + } + lab_d65() { + let color = this.model.to("lab-d65"); + return color.coords; + } + lch() { + let color = this.model.to("lch"); + return color.coords; + } + oklch() { + let color = this.model.to("oklch"); + return color.coords; + } + oklab() { + let color = this.model.to("oklab"); + return color.coords; + } + p3() { + let color = this.model.to("p3"); + return color.coords; + } + p3_linear() { + let color = this.model.to("p3-linear"); + return color.coords; + } + prophoto() { + let color = this.model.to("prophoto"); + return color.coords; + } + prophoto_linear() { + let color = this.model.to("prophoto-linear"); + return color.coords; + } + rec2020() { + let color = this.model.to("rec2020"); + return color.coords; + } + rec2020_linear() { + let color = this.model.to("rec2020-linear"); + return color.coords; + } + rec2100hlg() { + let color = this.model.to("rec2100hlg"); + return color.coords; + } + rec2100pq() { + let color = this.model.to("rec2100pq"); + return color.coords; + } + xyz_abs_d65() { + let color = this.model.to("xyz-abs-d65"); + return color.coords; + } + xyz_d50() { + let color = this.model.to("xyz-d50"); + return color.coords; + } + xyz_d65() { + let color = this.model.to("xyz-d65"); + return color.coords; + } + xyz() { + let color = this.model.to("xyz"); + return color.coords; + } + srgb() { + let color = this.model.to("srgb"); + return color; + } + srgb_linear() { + let color = this.model.to("srgb-linear"); + return color.coords; + } + hex() { + let color = this.srgb(); + let hex = (0, util_js_1.convertRGBtoHex)(Math.round(color.coords[0] * 255), Math.round(color.coords[1] * 255), Math.round(color.coords[2] * 255)); + // console.log(color.coords[0]); + return hex; + } + hcl() { + let hcl = { + "h": this.h, + "c": this.c, + "l": this.l + }; + return hcl; + } + // rgb() { + // let color = this.srgb(); + // let rgb = ( + // Math.round(color.coords[0]*255), + // Math.round(color.coords[1]*255), + // Math.round(color.coords[2]*255) + // ); + // return rgb; + // } + rgb() { + let color = this.srgb(); + let rgb = { + "r": Math.round(color.coords[0] * 255), + "g": Math.round(color.coords[1] * 255), + "b": Math.round(color.coords[2] * 255) + }; + return rgb; + } + // cmyk() { + // let color_srgb = this.srgb; + // let cmyk = rgb2cmyk( + // color_srgb[0], + // color_srgb[1], + // color_srgb[2], + // false + // ); + // let color = this.model.to("srgb-linear"); + // return color.coords; + // } + // // Color Strings + // // -------------------------------------------------------- + // let color_css = color_object + // let color_string_rgb = color_srgb.toString({precision: 3, format: "rgb"}); + // let color_string_rgba = color_srgb.toString({precision: 3, format: "rgba"}); + // let color_string_hex = color_srgb.toString({precision: 3, format: "hex"}); + // let color_string_color = color_srgb.toString({precision: 3, format: "color"}); + toString() { + const [r, g, b] = this.getRGB(); + return `rgb(${r}, ${g}, ${b})`; + } + toDict() { + return { + name: this.name, + hcl_h: this.h, + hcl_c: this.c, + hcl_l: this.l + }; + } +} +exports.ColorSwatch = ColorSwatch; diff --git a/dist/js/color/index.d.ts b/dist/js/color/index.d.ts new file mode 100644 index 0000000..0bf0cca --- /dev/null +++ b/dist/js/color/index.d.ts @@ -0,0 +1,3 @@ +export { ColorScheme } from './ColorScheme'; +export { ColorSwatch } from './ColorSwatch'; +export { ColorPicker } from './ColorPicker'; diff --git a/dist/js/color/index.js b/dist/js/color/index.js new file mode 100644 index 0000000..b4d5218 --- /dev/null +++ b/dist/js/color/index.js @@ -0,0 +1,19 @@ +"use strict"; +// Copyright 2024 Scape Agency BV +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ColorPicker = exports.ColorSwatch = exports.ColorScheme = void 0; +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +var ColorScheme_1 = require("./ColorScheme"); +Object.defineProperty(exports, "ColorScheme", { enumerable: true, get: function () { return ColorScheme_1.ColorScheme; } }); +var ColorSwatch_1 = require("./ColorSwatch"); +Object.defineProperty(exports, "ColorSwatch", { enumerable: true, get: function () { return ColorSwatch_1.ColorSwatch; } }); +var ColorPicker_1 = require("./ColorPicker"); +Object.defineProperty(exports, "ColorPicker", { enumerable: true, get: function () { return ColorPicker_1.ColorPicker; } }); diff --git a/dist/js/config/hue.config.d.ts b/dist/js/config/hue.config.d.ts new file mode 100644 index 0000000..09f942e --- /dev/null +++ b/dist/js/config/hue.config.d.ts @@ -0,0 +1,11 @@ +export declare const hueConfig: { + prefix: string; + h_step: number; + p_count: number; + l_l_min: number; + l_l_step: number; + d_l_step: number; + l_c_min: number; + l_c_step: number; + d_c_step: number; +}; diff --git a/dist/js/config/hue.config.js b/dist/js/config/hue.config.js new file mode 100644 index 0000000..37ba736 --- /dev/null +++ b/dist/js/config/hue.config.js @@ -0,0 +1,28 @@ +"use strict"; +// hue/config/hue.config.ts +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hueConfig = void 0; +// Copyright 2023 Scape Agency BV +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ============================================================================ +// Constants +// ============================================================================ +exports.hueConfig = { + prefix: "N", + h_step: 15, + p_count: 9, + l_l_min: 96, + l_l_step: -6, + d_l_step: -6, + l_c_min: 12, + l_c_step: 6, + d_c_step: -6 +}; diff --git a/dist/js/config/hue.names.d.ts b/dist/js/config/hue.names.d.ts new file mode 100644 index 0000000..d766573 --- /dev/null +++ b/dist/js/config/hue.names.d.ts @@ -0,0 +1,27 @@ +export declare const hueNames: { + 0: string; + 15: string; + 30: string; + 45: string; + 60: string; + 75: string; + 90: string; + 105: string; + 120: string; + 135: string; + 150: string; + 165: string; + 180: string; + 195: string; + 210: string; + 225: string; + 240: string; + 255: string; + 270: string; + 285: string; + 300: string; + 315: string; + 330: string; + 345: string; + 360: string; +}; diff --git a/dist/js/config/hue.names.js b/dist/js/config/hue.names.js new file mode 100644 index 0000000..a7f1cf3 --- /dev/null +++ b/dist/js/config/hue.names.js @@ -0,0 +1,44 @@ +"use strict"; +// hue/config/hue.names.ts +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hueNames = void 0; +// Copyright 2023 Scape Agency BV +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ============================================================================ +// Constants +// ============================================================================ +exports.hueNames = { + 0: "Grey", + 15: "Salmon", + 30: "Orange", + 45: "Amber", + 60: "Yellow", // Fixed + 75: "Lime", + 90: "Ecru", + 105: "Olive", + 120: "Green", // Fixed + 135: "Forest", + 150: "Jade", + 165: "Mint", + 180: "Cyan", // Fixed + 195: "Teal", + 210: "Capri", + 225: "Sky", + 240: "Blue", // Fixed + 255: "Azure", + 270: "Indigo", + 285: "Violet", + 300: "Magenta", // Fixed + 315: "Purple", + 330: "Rose", + 345: "Pink", + 360: "Red" +}; diff --git a/dist/js/config/index.d.ts b/dist/js/config/index.d.ts new file mode 100644 index 0000000..834d72b --- /dev/null +++ b/dist/js/config/index.d.ts @@ -0,0 +1,2 @@ +export { hueConfig } from './hue.config'; +export { hueNames } from './hue.names'; diff --git a/dist/js/config/index.js b/dist/js/config/index.js new file mode 100644 index 0000000..9e0a759 --- /dev/null +++ b/dist/js/config/index.js @@ -0,0 +1,17 @@ +"use strict"; +// Copyright 2024 Scape Agency BV +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hueNames = exports.hueConfig = void 0; +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +var hue_config_1 = require("./hue.config"); +Object.defineProperty(exports, "hueConfig", { enumerable: true, get: function () { return hue_config_1.hueConfig; } }); +var hue_names_1 = require("./hue.names"); +Object.defineProperty(exports, "hueNames", { enumerable: true, get: function () { return hue_names_1.hueNames; } }); diff --git a/dist/js/constants/hue_hcl.d.ts b/dist/js/constants/hue_hcl.d.ts new file mode 100644 index 0000000..73b93be --- /dev/null +++ b/dist/js/constants/hue_hcl.d.ts @@ -0,0 +1,227 @@ +export declare enum hue_hcl { + N0001 = "hcl(0, 0, 90)", + N0002 = "hcl(0, 0, 82)", + N0003 = "hcl(0, 0, 74)", + N0004 = "hcl(0, 0, 66)", + N0005 = "hcl(0, 0, 58)", + N0006 = "hcl(0, 0, 50)", + N0007 = "hcl(0, 0, 42)", + N0008 = "hcl(0, 0, 34)", + N0009 = "hcl(0, 0, 26)", + N0151 = "hcl(15, 12, 90)", + N0152 = "hcl(15, 18, 82)", + N0153 = "hcl(15, 24, 74)", + N0154 = "hcl(15, 30, 66)", + N0155 = "hcl(15, 36, 58)", + N0156 = "hcl(15, 30, 50)", + N0157 = "hcl(15, 24, 42)", + N0158 = "hcl(15, 18, 34)", + N0159 = "hcl(15, 12, 26)", + N0301 = "hcl(30, 12, 90)", + N0302 = "hcl(30, 18, 82)", + N0303 = "hcl(30, 24, 74)", + N0304 = "hcl(30, 30, 66)", + N0305 = "hcl(30, 36, 58)", + N0306 = "hcl(30, 30, 50)", + N0307 = "hcl(30, 24, 42)", + N0308 = "hcl(30, 18, 34)", + N0309 = "hcl(30, 12, 26)", + N0451 = "hcl(45, 12, 90)", + N0452 = "hcl(45, 18, 82)", + N0453 = "hcl(45, 24, 74)", + N0454 = "hcl(45, 30, 66)", + N0455 = "hcl(45, 36, 58)", + N0456 = "hcl(45, 30, 50)", + N0457 = "hcl(45, 24, 42)", + N0458 = "hcl(45, 18, 34)", + N0459 = "hcl(45, 12, 26)", + N0601 = "hcl(60, 12, 90)", + N0602 = "hcl(60, 18, 82)", + N0603 = "hcl(60, 24, 74)", + N0604 = "hcl(60, 30, 66)", + N0605 = "hcl(60, 36, 58)", + N0606 = "hcl(60, 30, 50)", + N0607 = "hcl(60, 24, 42)", + N0608 = "hcl(60, 18, 34)", + N0609 = "hcl(60, 12, 26)", + N0751 = "hcl(75, 12, 90)", + N0752 = "hcl(75, 18, 82)", + N0753 = "hcl(75, 24, 74)", + N0754 = "hcl(75, 30, 66)", + N0755 = "hcl(75, 36, 58)", + N0756 = "hcl(75, 30, 50)", + N0757 = "hcl(75, 24, 42)", + N0758 = "hcl(75, 18, 34)", + N0759 = "hcl(75, 12, 26)", + N0901 = "hcl(90, 12, 90)", + N0902 = "hcl(90, 18, 82)", + N0903 = "hcl(90, 24, 74)", + N0904 = "hcl(90, 30, 66)", + N0905 = "hcl(90, 36, 58)", + N0906 = "hcl(90, 30, 50)", + N0907 = "hcl(90, 24, 42)", + N0908 = "hcl(90, 18, 34)", + N0909 = "hcl(90, 12, 26)", + N1051 = "hcl(105, 12, 90)", + N1052 = "hcl(105, 18, 82)", + N1053 = "hcl(105, 24, 74)", + N1054 = "hcl(105, 30, 66)", + N1055 = "hcl(105, 36, 58)", + N1056 = "hcl(105, 30, 50)", + N1057 = "hcl(105, 24, 42)", + N1058 = "hcl(105, 18, 34)", + N1059 = "hcl(105, 12, 26)", + N1201 = "hcl(120, 12, 90)", + N1202 = "hcl(120, 18, 82)", + N1203 = "hcl(120, 24, 74)", + N1204 = "hcl(120, 30, 66)", + N1205 = "hcl(120, 36, 58)", + N1206 = "hcl(120, 30, 50)", + N1207 = "hcl(120, 24, 42)", + N1208 = "hcl(120, 18, 34)", + N1209 = "hcl(120, 12, 26)", + N1351 = "hcl(135, 12, 90)", + N1352 = "hcl(135, 18, 82)", + N1353 = "hcl(135, 24, 74)", + N1354 = "hcl(135, 30, 66)", + N1355 = "hcl(135, 36, 58)", + N1356 = "hcl(135, 30, 50)", + N1357 = "hcl(135, 24, 42)", + N1358 = "hcl(135, 18, 34)", + N1359 = "hcl(135, 12, 26)", + N1501 = "hcl(150, 12, 90)", + N1502 = "hcl(150, 18, 82)", + N1503 = "hcl(150, 24, 74)", + N1504 = "hcl(150, 30, 66)", + N1505 = "hcl(150, 36, 58)", + N1506 = "hcl(150, 30, 50)", + N1507 = "hcl(150, 24, 42)", + N1508 = "hcl(150, 18, 34)", + N1509 = "hcl(150, 12, 26)", + N1651 = "hcl(165, 12, 90)", + N1652 = "hcl(165, 18, 82)", + N1653 = "hcl(165, 24, 74)", + N1654 = "hcl(165, 30, 66)", + N1655 = "hcl(165, 36, 58)", + N1656 = "hcl(165, 30, 50)", + N1657 = "hcl(165, 24, 42)", + N1658 = "hcl(165, 18, 34)", + N1659 = "hcl(165, 12, 26)", + N1801 = "hcl(180, 12, 90)", + N1802 = "hcl(180, 18, 82)", + N1803 = "hcl(180, 24, 74)", + N1804 = "hcl(180, 30, 66)", + N1805 = "hcl(180, 36, 58)", + N1806 = "hcl(180, 30, 50)", + N1807 = "hcl(180, 24, 42)", + N1808 = "hcl(180, 18, 34)", + N1809 = "hcl(180, 12, 26)", + N1951 = "hcl(195, 12, 90)", + N1952 = "hcl(195, 18, 82)", + N1953 = "hcl(195, 24, 74)", + N1954 = "hcl(195, 30, 66)", + N1955 = "hcl(195, 36, 58)", + N1956 = "hcl(195, 30, 50)", + N1957 = "hcl(195, 24, 42)", + N1958 = "hcl(195, 18, 34)", + N1959 = "hcl(195, 12, 26)", + N2101 = "hcl(210, 12, 90)", + N2102 = "hcl(210, 18, 82)", + N2103 = "hcl(210, 24, 74)", + N2104 = "hcl(210, 30, 66)", + N2105 = "hcl(210, 36, 58)", + N2106 = "hcl(210, 30, 50)", + N2107 = "hcl(210, 24, 42)", + N2108 = "hcl(210, 18, 34)", + N2109 = "hcl(210, 12, 26)", + N2251 = "hcl(225, 12, 90)", + N2252 = "hcl(225, 18, 82)", + N2253 = "hcl(225, 24, 74)", + N2254 = "hcl(225, 30, 66)", + N2255 = "hcl(225, 36, 58)", + N2256 = "hcl(225, 30, 50)", + N2257 = "hcl(225, 24, 42)", + N2258 = "hcl(225, 18, 34)", + N2259 = "hcl(225, 12, 26)", + N2401 = "hcl(240, 12, 90)", + N2402 = "hcl(240, 18, 82)", + N2403 = "hcl(240, 24, 74)", + N2404 = "hcl(240, 30, 66)", + N2405 = "hcl(240, 36, 58)", + N2406 = "hcl(240, 30, 50)", + N2407 = "hcl(240, 24, 42)", + N2408 = "hcl(240, 18, 34)", + N2409 = "hcl(240, 12, 26)", + N2551 = "hcl(255, 12, 90)", + N2552 = "hcl(255, 18, 82)", + N2553 = "hcl(255, 24, 74)", + N2554 = "hcl(255, 30, 66)", + N2555 = "hcl(255, 36, 58)", + N2556 = "hcl(255, 30, 50)", + N2557 = "hcl(255, 24, 42)", + N2558 = "hcl(255, 18, 34)", + N2559 = "hcl(255, 12, 26)", + N2701 = "hcl(270, 12, 90)", + N2702 = "hcl(270, 18, 82)", + N2703 = "hcl(270, 24, 74)", + N2704 = "hcl(270, 30, 66)", + N2705 = "hcl(270, 36, 58)", + N2706 = "hcl(270, 30, 50)", + N2707 = "hcl(270, 24, 42)", + N2708 = "hcl(270, 18, 34)", + N2709 = "hcl(270, 12, 26)", + N2851 = "hcl(285, 12, 90)", + N2852 = "hcl(285, 18, 82)", + N2853 = "hcl(285, 24, 74)", + N2854 = "hcl(285, 30, 66)", + N2855 = "hcl(285, 36, 58)", + N2856 = "hcl(285, 30, 50)", + N2857 = "hcl(285, 24, 42)", + N2858 = "hcl(285, 18, 34)", + N2859 = "hcl(285, 12, 26)", + N3001 = "hcl(300, 12, 90)", + N3002 = "hcl(300, 18, 82)", + N3003 = "hcl(300, 24, 74)", + N3004 = "hcl(300, 30, 66)", + N3005 = "hcl(300, 36, 58)", + N3006 = "hcl(300, 30, 50)", + N3007 = "hcl(300, 24, 42)", + N3008 = "hcl(300, 18, 34)", + N3009 = "hcl(300, 12, 26)", + N3151 = "hcl(315, 12, 90)", + N3152 = "hcl(315, 18, 82)", + N3153 = "hcl(315, 24, 74)", + N3154 = "hcl(315, 30, 66)", + N3155 = "hcl(315, 36, 58)", + N3156 = "hcl(315, 30, 50)", + N3157 = "hcl(315, 24, 42)", + N3158 = "hcl(315, 18, 34)", + N3159 = "hcl(315, 12, 26)", + N3301 = "hcl(330, 12, 90)", + N3302 = "hcl(330, 18, 82)", + N3303 = "hcl(330, 24, 74)", + N3304 = "hcl(330, 30, 66)", + N3305 = "hcl(330, 36, 58)", + N3306 = "hcl(330, 30, 50)", + N3307 = "hcl(330, 24, 42)", + N3308 = "hcl(330, 18, 34)", + N3309 = "hcl(330, 12, 26)", + N3451 = "hcl(345, 12, 90)", + N3452 = "hcl(345, 18, 82)", + N3453 = "hcl(345, 24, 74)", + N3454 = "hcl(345, 30, 66)", + N3455 = "hcl(345, 36, 58)", + N3456 = "hcl(345, 30, 50)", + N3457 = "hcl(345, 24, 42)", + N3458 = "hcl(345, 18, 34)", + N3459 = "hcl(345, 12, 26)", + N3601 = "hcl(360, 12, 90)", + N3602 = "hcl(360, 18, 82)", + N3603 = "hcl(360, 24, 74)", + N3604 = "hcl(360, 30, 66)", + N3605 = "hcl(360, 36, 58)", + N3606 = "hcl(360, 30, 50)", + N3607 = "hcl(360, 24, 42)", + N3608 = "hcl(360, 18, 34)", + N3609 = "hcl(360, 12, 26)" +} diff --git a/dist/js/constants/hue_hcl.js b/dist/js/constants/hue_hcl.js new file mode 100644 index 0000000..ca9508b --- /dev/null +++ b/dist/js/constants/hue_hcl.js @@ -0,0 +1,299 @@ +"use strict"; +// Copyright 2023 Scape Agency BV +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hue_hcl = void 0; +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ============================================================================ +// +// hue.gl +// 0.0.11 +// +// ============================================================================ +// General +// ============================================================================ +var hue_hcl; +(function (hue_hcl) { + // Grey + // ------------------------------------------------------------------------ + hue_hcl["N0001"] = "hcl(0, 0, 90)"; + hue_hcl["N0002"] = "hcl(0, 0, 82)"; + hue_hcl["N0003"] = "hcl(0, 0, 74)"; + hue_hcl["N0004"] = "hcl(0, 0, 66)"; + hue_hcl["N0005"] = "hcl(0, 0, 58)"; + hue_hcl["N0006"] = "hcl(0, 0, 50)"; + hue_hcl["N0007"] = "hcl(0, 0, 42)"; + hue_hcl["N0008"] = "hcl(0, 0, 34)"; + hue_hcl["N0009"] = "hcl(0, 0, 26)"; + // Salmon + // ------------------------------------------------------------------------ + hue_hcl["N0151"] = "hcl(15, 12, 90)"; + hue_hcl["N0152"] = "hcl(15, 18, 82)"; + hue_hcl["N0153"] = "hcl(15, 24, 74)"; + hue_hcl["N0154"] = "hcl(15, 30, 66)"; + hue_hcl["N0155"] = "hcl(15, 36, 58)"; + hue_hcl["N0156"] = "hcl(15, 30, 50)"; + hue_hcl["N0157"] = "hcl(15, 24, 42)"; + hue_hcl["N0158"] = "hcl(15, 18, 34)"; + hue_hcl["N0159"] = "hcl(15, 12, 26)"; + // Orange + // ------------------------------------------------------------------------ + hue_hcl["N0301"] = "hcl(30, 12, 90)"; + hue_hcl["N0302"] = "hcl(30, 18, 82)"; + hue_hcl["N0303"] = "hcl(30, 24, 74)"; + hue_hcl["N0304"] = "hcl(30, 30, 66)"; + hue_hcl["N0305"] = "hcl(30, 36, 58)"; + hue_hcl["N0306"] = "hcl(30, 30, 50)"; + hue_hcl["N0307"] = "hcl(30, 24, 42)"; + hue_hcl["N0308"] = "hcl(30, 18, 34)"; + hue_hcl["N0309"] = "hcl(30, 12, 26)"; + // Amber + // ------------------------------------------------------------------------ + hue_hcl["N0451"] = "hcl(45, 12, 90)"; + hue_hcl["N0452"] = "hcl(45, 18, 82)"; + hue_hcl["N0453"] = "hcl(45, 24, 74)"; + hue_hcl["N0454"] = "hcl(45, 30, 66)"; + hue_hcl["N0455"] = "hcl(45, 36, 58)"; + hue_hcl["N0456"] = "hcl(45, 30, 50)"; + hue_hcl["N0457"] = "hcl(45, 24, 42)"; + hue_hcl["N0458"] = "hcl(45, 18, 34)"; + hue_hcl["N0459"] = "hcl(45, 12, 26)"; + // Yellow + // ------------------------------------------------------------------------ + hue_hcl["N0601"] = "hcl(60, 12, 90)"; + hue_hcl["N0602"] = "hcl(60, 18, 82)"; + hue_hcl["N0603"] = "hcl(60, 24, 74)"; + hue_hcl["N0604"] = "hcl(60, 30, 66)"; + hue_hcl["N0605"] = "hcl(60, 36, 58)"; + hue_hcl["N0606"] = "hcl(60, 30, 50)"; + hue_hcl["N0607"] = "hcl(60, 24, 42)"; + hue_hcl["N0608"] = "hcl(60, 18, 34)"; + hue_hcl["N0609"] = "hcl(60, 12, 26)"; + // Lime + // ------------------------------------------------------------------------ + hue_hcl["N0751"] = "hcl(75, 12, 90)"; + hue_hcl["N0752"] = "hcl(75, 18, 82)"; + hue_hcl["N0753"] = "hcl(75, 24, 74)"; + hue_hcl["N0754"] = "hcl(75, 30, 66)"; + hue_hcl["N0755"] = "hcl(75, 36, 58)"; + hue_hcl["N0756"] = "hcl(75, 30, 50)"; + hue_hcl["N0757"] = "hcl(75, 24, 42)"; + hue_hcl["N0758"] = "hcl(75, 18, 34)"; + hue_hcl["N0759"] = "hcl(75, 12, 26)"; + // Ecru + // ------------------------------------------------------------------------ + hue_hcl["N0901"] = "hcl(90, 12, 90)"; + hue_hcl["N0902"] = "hcl(90, 18, 82)"; + hue_hcl["N0903"] = "hcl(90, 24, 74)"; + hue_hcl["N0904"] = "hcl(90, 30, 66)"; + hue_hcl["N0905"] = "hcl(90, 36, 58)"; + hue_hcl["N0906"] = "hcl(90, 30, 50)"; + hue_hcl["N0907"] = "hcl(90, 24, 42)"; + hue_hcl["N0908"] = "hcl(90, 18, 34)"; + hue_hcl["N0909"] = "hcl(90, 12, 26)"; + // Olive + // ------------------------------------------------------------------------ + hue_hcl["N1051"] = "hcl(105, 12, 90)"; + hue_hcl["N1052"] = "hcl(105, 18, 82)"; + hue_hcl["N1053"] = "hcl(105, 24, 74)"; + hue_hcl["N1054"] = "hcl(105, 30, 66)"; + hue_hcl["N1055"] = "hcl(105, 36, 58)"; + hue_hcl["N1056"] = "hcl(105, 30, 50)"; + hue_hcl["N1057"] = "hcl(105, 24, 42)"; + hue_hcl["N1058"] = "hcl(105, 18, 34)"; + hue_hcl["N1059"] = "hcl(105, 12, 26)"; + // Green + // ------------------------------------------------------------------------ + hue_hcl["N1201"] = "hcl(120, 12, 90)"; + hue_hcl["N1202"] = "hcl(120, 18, 82)"; + hue_hcl["N1203"] = "hcl(120, 24, 74)"; + hue_hcl["N1204"] = "hcl(120, 30, 66)"; + hue_hcl["N1205"] = "hcl(120, 36, 58)"; + hue_hcl["N1206"] = "hcl(120, 30, 50)"; + hue_hcl["N1207"] = "hcl(120, 24, 42)"; + hue_hcl["N1208"] = "hcl(120, 18, 34)"; + hue_hcl["N1209"] = "hcl(120, 12, 26)"; + // Forest + // ------------------------------------------------------------------------ + hue_hcl["N1351"] = "hcl(135, 12, 90)"; + hue_hcl["N1352"] = "hcl(135, 18, 82)"; + hue_hcl["N1353"] = "hcl(135, 24, 74)"; + hue_hcl["N1354"] = "hcl(135, 30, 66)"; + hue_hcl["N1355"] = "hcl(135, 36, 58)"; + hue_hcl["N1356"] = "hcl(135, 30, 50)"; + hue_hcl["N1357"] = "hcl(135, 24, 42)"; + hue_hcl["N1358"] = "hcl(135, 18, 34)"; + hue_hcl["N1359"] = "hcl(135, 12, 26)"; + // Jade + // ------------------------------------------------------------------------ + hue_hcl["N1501"] = "hcl(150, 12, 90)"; + hue_hcl["N1502"] = "hcl(150, 18, 82)"; + hue_hcl["N1503"] = "hcl(150, 24, 74)"; + hue_hcl["N1504"] = "hcl(150, 30, 66)"; + hue_hcl["N1505"] = "hcl(150, 36, 58)"; + hue_hcl["N1506"] = "hcl(150, 30, 50)"; + hue_hcl["N1507"] = "hcl(150, 24, 42)"; + hue_hcl["N1508"] = "hcl(150, 18, 34)"; + hue_hcl["N1509"] = "hcl(150, 12, 26)"; + // Mint + // ------------------------------------------------------------------------ + hue_hcl["N1651"] = "hcl(165, 12, 90)"; + hue_hcl["N1652"] = "hcl(165, 18, 82)"; + hue_hcl["N1653"] = "hcl(165, 24, 74)"; + hue_hcl["N1654"] = "hcl(165, 30, 66)"; + hue_hcl["N1655"] = "hcl(165, 36, 58)"; + hue_hcl["N1656"] = "hcl(165, 30, 50)"; + hue_hcl["N1657"] = "hcl(165, 24, 42)"; + hue_hcl["N1658"] = "hcl(165, 18, 34)"; + hue_hcl["N1659"] = "hcl(165, 12, 26)"; + // Cyan + // ------------------------------------------------------------------------ + hue_hcl["N1801"] = "hcl(180, 12, 90)"; + hue_hcl["N1802"] = "hcl(180, 18, 82)"; + hue_hcl["N1803"] = "hcl(180, 24, 74)"; + hue_hcl["N1804"] = "hcl(180, 30, 66)"; + hue_hcl["N1805"] = "hcl(180, 36, 58)"; + hue_hcl["N1806"] = "hcl(180, 30, 50)"; + hue_hcl["N1807"] = "hcl(180, 24, 42)"; + hue_hcl["N1808"] = "hcl(180, 18, 34)"; + hue_hcl["N1809"] = "hcl(180, 12, 26)"; + // Teal + // ------------------------------------------------------------------------ + hue_hcl["N1951"] = "hcl(195, 12, 90)"; + hue_hcl["N1952"] = "hcl(195, 18, 82)"; + hue_hcl["N1953"] = "hcl(195, 24, 74)"; + hue_hcl["N1954"] = "hcl(195, 30, 66)"; + hue_hcl["N1955"] = "hcl(195, 36, 58)"; + hue_hcl["N1956"] = "hcl(195, 30, 50)"; + hue_hcl["N1957"] = "hcl(195, 24, 42)"; + hue_hcl["N1958"] = "hcl(195, 18, 34)"; + hue_hcl["N1959"] = "hcl(195, 12, 26)"; + // Capri + // ------------------------------------------------------------------------ + hue_hcl["N2101"] = "hcl(210, 12, 90)"; + hue_hcl["N2102"] = "hcl(210, 18, 82)"; + hue_hcl["N2103"] = "hcl(210, 24, 74)"; + hue_hcl["N2104"] = "hcl(210, 30, 66)"; + hue_hcl["N2105"] = "hcl(210, 36, 58)"; + hue_hcl["N2106"] = "hcl(210, 30, 50)"; + hue_hcl["N2107"] = "hcl(210, 24, 42)"; + hue_hcl["N2108"] = "hcl(210, 18, 34)"; + hue_hcl["N2109"] = "hcl(210, 12, 26)"; + // Sky + // ------------------------------------------------------------------------ + hue_hcl["N2251"] = "hcl(225, 12, 90)"; + hue_hcl["N2252"] = "hcl(225, 18, 82)"; + hue_hcl["N2253"] = "hcl(225, 24, 74)"; + hue_hcl["N2254"] = "hcl(225, 30, 66)"; + hue_hcl["N2255"] = "hcl(225, 36, 58)"; + hue_hcl["N2256"] = "hcl(225, 30, 50)"; + hue_hcl["N2257"] = "hcl(225, 24, 42)"; + hue_hcl["N2258"] = "hcl(225, 18, 34)"; + hue_hcl["N2259"] = "hcl(225, 12, 26)"; + // Blue + // ------------------------------------------------------------------------ + hue_hcl["N2401"] = "hcl(240, 12, 90)"; + hue_hcl["N2402"] = "hcl(240, 18, 82)"; + hue_hcl["N2403"] = "hcl(240, 24, 74)"; + hue_hcl["N2404"] = "hcl(240, 30, 66)"; + hue_hcl["N2405"] = "hcl(240, 36, 58)"; + hue_hcl["N2406"] = "hcl(240, 30, 50)"; + hue_hcl["N2407"] = "hcl(240, 24, 42)"; + hue_hcl["N2408"] = "hcl(240, 18, 34)"; + hue_hcl["N2409"] = "hcl(240, 12, 26)"; + // Azure + // ------------------------------------------------------------------------ + hue_hcl["N2551"] = "hcl(255, 12, 90)"; + hue_hcl["N2552"] = "hcl(255, 18, 82)"; + hue_hcl["N2553"] = "hcl(255, 24, 74)"; + hue_hcl["N2554"] = "hcl(255, 30, 66)"; + hue_hcl["N2555"] = "hcl(255, 36, 58)"; + hue_hcl["N2556"] = "hcl(255, 30, 50)"; + hue_hcl["N2557"] = "hcl(255, 24, 42)"; + hue_hcl["N2558"] = "hcl(255, 18, 34)"; + hue_hcl["N2559"] = "hcl(255, 12, 26)"; + // Indigo + // ------------------------------------------------------------------------ + hue_hcl["N2701"] = "hcl(270, 12, 90)"; + hue_hcl["N2702"] = "hcl(270, 18, 82)"; + hue_hcl["N2703"] = "hcl(270, 24, 74)"; + hue_hcl["N2704"] = "hcl(270, 30, 66)"; + hue_hcl["N2705"] = "hcl(270, 36, 58)"; + hue_hcl["N2706"] = "hcl(270, 30, 50)"; + hue_hcl["N2707"] = "hcl(270, 24, 42)"; + hue_hcl["N2708"] = "hcl(270, 18, 34)"; + hue_hcl["N2709"] = "hcl(270, 12, 26)"; + // Violet + // ------------------------------------------------------------------------ + hue_hcl["N2851"] = "hcl(285, 12, 90)"; + hue_hcl["N2852"] = "hcl(285, 18, 82)"; + hue_hcl["N2853"] = "hcl(285, 24, 74)"; + hue_hcl["N2854"] = "hcl(285, 30, 66)"; + hue_hcl["N2855"] = "hcl(285, 36, 58)"; + hue_hcl["N2856"] = "hcl(285, 30, 50)"; + hue_hcl["N2857"] = "hcl(285, 24, 42)"; + hue_hcl["N2858"] = "hcl(285, 18, 34)"; + hue_hcl["N2859"] = "hcl(285, 12, 26)"; + // Magenta + // ------------------------------------------------------------------------ + hue_hcl["N3001"] = "hcl(300, 12, 90)"; + hue_hcl["N3002"] = "hcl(300, 18, 82)"; + hue_hcl["N3003"] = "hcl(300, 24, 74)"; + hue_hcl["N3004"] = "hcl(300, 30, 66)"; + hue_hcl["N3005"] = "hcl(300, 36, 58)"; + hue_hcl["N3006"] = "hcl(300, 30, 50)"; + hue_hcl["N3007"] = "hcl(300, 24, 42)"; + hue_hcl["N3008"] = "hcl(300, 18, 34)"; + hue_hcl["N3009"] = "hcl(300, 12, 26)"; + // Purple + // ------------------------------------------------------------------------ + hue_hcl["N3151"] = "hcl(315, 12, 90)"; + hue_hcl["N3152"] = "hcl(315, 18, 82)"; + hue_hcl["N3153"] = "hcl(315, 24, 74)"; + hue_hcl["N3154"] = "hcl(315, 30, 66)"; + hue_hcl["N3155"] = "hcl(315, 36, 58)"; + hue_hcl["N3156"] = "hcl(315, 30, 50)"; + hue_hcl["N3157"] = "hcl(315, 24, 42)"; + hue_hcl["N3158"] = "hcl(315, 18, 34)"; + hue_hcl["N3159"] = "hcl(315, 12, 26)"; + // Rose + // ------------------------------------------------------------------------ + hue_hcl["N3301"] = "hcl(330, 12, 90)"; + hue_hcl["N3302"] = "hcl(330, 18, 82)"; + hue_hcl["N3303"] = "hcl(330, 24, 74)"; + hue_hcl["N3304"] = "hcl(330, 30, 66)"; + hue_hcl["N3305"] = "hcl(330, 36, 58)"; + hue_hcl["N3306"] = "hcl(330, 30, 50)"; + hue_hcl["N3307"] = "hcl(330, 24, 42)"; + hue_hcl["N3308"] = "hcl(330, 18, 34)"; + hue_hcl["N3309"] = "hcl(330, 12, 26)"; + // Pink + // ------------------------------------------------------------------------ + hue_hcl["N3451"] = "hcl(345, 12, 90)"; + hue_hcl["N3452"] = "hcl(345, 18, 82)"; + hue_hcl["N3453"] = "hcl(345, 24, 74)"; + hue_hcl["N3454"] = "hcl(345, 30, 66)"; + hue_hcl["N3455"] = "hcl(345, 36, 58)"; + hue_hcl["N3456"] = "hcl(345, 30, 50)"; + hue_hcl["N3457"] = "hcl(345, 24, 42)"; + hue_hcl["N3458"] = "hcl(345, 18, 34)"; + hue_hcl["N3459"] = "hcl(345, 12, 26)"; + // Red + // ------------------------------------------------------------------------ + hue_hcl["N3601"] = "hcl(360, 12, 90)"; + hue_hcl["N3602"] = "hcl(360, 18, 82)"; + hue_hcl["N3603"] = "hcl(360, 24, 74)"; + hue_hcl["N3604"] = "hcl(360, 30, 66)"; + hue_hcl["N3605"] = "hcl(360, 36, 58)"; + hue_hcl["N3606"] = "hcl(360, 30, 50)"; + hue_hcl["N3607"] = "hcl(360, 24, 42)"; + hue_hcl["N3608"] = "hcl(360, 18, 34)"; + hue_hcl["N3609"] = "hcl(360, 12, 26)"; +})(hue_hcl || (exports.hue_hcl = hue_hcl = {})); diff --git a/dist/js/constants/hue_hex.d.ts b/dist/js/constants/hue_hex.d.ts new file mode 100644 index 0000000..a973187 --- /dev/null +++ b/dist/js/constants/hue_hex.d.ts @@ -0,0 +1,227 @@ +export declare enum hue_hex { + N0001 = "#e2e2e2", + N0002 = "#cccccc", + N0003 = "#b6b6b6", + N0004 = "#a0a0a0", + N0005 = "#8b8b8b", + N0006 = "#777777", + N0007 = "#636363", + N0008 = "#505050", + N0009 = "#3e3e3e", + N0151 = "#fadbdd", + N0152 = "#eec0c4", + N0153 = "#e2a6ac", + N0154 = "#d48c94", + N0155 = "#c6727d", + N0156 = "#a7636b", + N0157 = "#89545a", + N0158 = "#6b4549", + N0159 = "#4f3739", + N0301 = "#fadbd7", + N0302 = "#edc1bc", + N0303 = "#e0a8a1", + N0304 = "#d28e87", + N0305 = "#c4756e", + N0306 = "#a5655f", + N0307 = "#875650", + N0308 = "#6b4642", + N0309 = "#4f3835", + N0451 = "#f8dcd3", + N0452 = "#eac3b5", + N0453 = "#dcaa98", + N0454 = "#cd927c", + N0455 = "#be7960", + N0456 = "#a06954", + N0457 = "#845848", + N0458 = "#68483c", + N0459 = "#4d3931", + N0601 = "#f4decf", + N0602 = "#e5c6af", + N0603 = "#d5ad90", + N0604 = "#c59672", + N0605 = "#b57f55", + N0606 = "#996d4b", + N0607 = "#7e5b41", + N0608 = "#644a38", + N0609 = "#4a3a2e", + N0751 = "#efe0cc", + N0752 = "#dec8ac", + N0753 = "#cdb18c", + N0754 = "#bb9b6c", + N0755 = "#a9854e", + N0756 = "#8f7145", + N0757 = "#765f3d", + N0758 = "#5e4d34", + N0759 = "#473c2c", + N0901 = "#eae2cb", + N0902 = "#d6cbaa", + N0903 = "#c2b58a", + N0904 = "#af9f6a", + N0905 = "#9b8a4b", + N0906 = "#847643", + N0907 = "#6d623b", + N0908 = "#584f33", + N0909 = "#433d2b", + N1051 = "#e3e4cc", + N1052 = "#cdceab", + N1053 = "#b7b98b", + N1054 = "#a1a46b", + N1055 = "#8b8f4c", + N1056 = "#777a44", + N1057 = "#63663c", + N1058 = "#505234", + N1059 = "#3e3f2c", + N1201 = "#dde6ce", + N1202 = "#c4d1ae", + N1203 = "#abbc8f", + N1204 = "#92a870", + N1205 = "#7a9453", + N1206 = "#697e49", + N1207 = "#586840", + N1208 = "#485437", + N1209 = "#39402d", + N1351 = "#d7e7d2", + N1352 = "#bbd3b3", + N1353 = "#9fbf96", + N1354 = "#83ab79", + N1355 = "#68975d", + N1356 = "#5a8151", + N1357 = "#4d6b46", + N1358 = "#40553b", + N1359 = "#344130", + N1501 = "#d1e8d6", + N1502 = "#b2d4ba", + N1503 = "#93c19f", + N1504 = "#74ad84", + N1505 = "#559a6a", + N1506 = "#4b835c", + N1507 = "#426c4e", + N1508 = "#395741", + N1509 = "#2f4234", + N1651 = "#cde9dc", + N1652 = "#abd6c2", + N1653 = "#89c2a9", + N1654 = "#66af91", + N1655 = "#409b7a", + N1656 = "#3c8469", + N1657 = "#376d58", + N1658 = "#315848", + N1659 = "#2b4338", + N1801 = "#c9e9e2", + N1802 = "#a6d6cb", + N1803 = "#81c3b5", + N1804 = "#5baf9f", + N1805 = "#2a9c8a", + N1806 = "#2d8576", + N1807 = "#2d6e62", + N1808 = "#2b584f", + N1809 = "#28433d", + N1951 = "#c8e9e8", + N1952 = "#a3d6d4", + N1953 = "#7dc3c0", + N1954 = "#53afad", + N1955 = "#109c9a", + N1956 = "#208583", + N1957 = "#266e6d", + N1958 = "#275857", + N1959 = "#264342", + N2101 = "#c8e9ed", + N2102 = "#a3d5dc", + N2103 = "#7dc2cb", + N2104 = "#52aeba", + N2105 = "#019baa", + N2106 = "#1c8490", + N2107 = "#246d76", + N2108 = "#27575e", + N2109 = "#264246", + N2251 = "#cae8f2", + N2252 = "#a6d4e3", + N2253 = "#81c0d4", + N2254 = "#58acc6", + N2255 = "#1a99b7", + N2256 = "#25829a", + N2257 = "#2a6c7e", + N2258 = "#2a5664", + N2259 = "#27424a", + N2401 = "#cee6f6", + N2402 = "#acd2e9", + N2403 = "#8abedc", + N2404 = "#65aace", + N2405 = "#3696c1", + N2406 = "#3680a3", + N2407 = "#346a85", + N2408 = "#305568", + N2409 = "#2b414d", + N2551 = "#d3e5f8", + N2552 = "#b5cfec", + N2553 = "#95bbe0", + N2554 = "#75a6d4", + N2555 = "#5192c8", + N2556 = "#497ca8", + N2557 = "#416789", + N2558 = "#39536b", + N2559 = "#303f4f", + N2701 = "#dae3f9", + N2702 = "#becdee", + N2703 = "#a3b7e2", + N2704 = "#87a2d6", + N2705 = "#6a8dca", + N2706 = "#5d78aa", + N2707 = "#4f648b", + N2708 = "#42516c", + N2709 = "#353e50", + N2851 = "#e0e1f9", + N2852 = "#c8caed", + N2853 = "#b1b3e1", + N2854 = "#999dd5", + N2855 = "#8188c8", + N2856 = "#6f74a8", + N2857 = "#5d6189", + N2858 = "#4c4e6c", + N2859 = "#3b3c4f", + N3001 = "#e7dff6", + N3002 = "#d3c7e9", + N3003 = "#beafdc", + N3004 = "#aa98cf", + N3005 = "#9582c2", + N3006 = "#7f6fa3", + N3007 = "#6a5d86", + N3008 = "#554c69", + N3009 = "#413b4d", + N3151 = "#edddf3", + N3152 = "#dcc4e4", + N3153 = "#caacd6", + N3154 = "#b994c7", + N3155 = "#a77cb9", + N3156 = "#8d6b9c", + N3157 = "#755a7f", + N3158 = "#5d4964", + N3159 = "#46394b", + N3301 = "#f3dcee", + N3302 = "#e3c2dd", + N3303 = "#d4a9cd", + N3304 = "#c590bc", + N3305 = "#b577ac", + N3306 = "#996791", + N3307 = "#7d5777", + N3308 = "#63475f", + N3309 = "#4a3847", + N3451 = "#f7dbe9", + N3452 = "#e9c1d5", + N3453 = "#dba7c2", + N3454 = "#cd8daf", + N3455 = "#bf739d", + N3456 = "#a16485", + N3457 = "#84546e", + N3458 = "#684658", + N3459 = "#4d3743", + N3601 = "#f9dbe3", + N3602 = "#edc0cd", + N3603 = "#e0a6b7", + N3604 = "#d38ca2", + N3605 = "#c5728d", + N3606 = "#a66278", + N3607 = "#885464", + N3608 = "#6b4551", + N3609 = "#4f373e" +} diff --git a/dist/js/constants/hue_hex.js b/dist/js/constants/hue_hex.js new file mode 100644 index 0000000..25fea94 --- /dev/null +++ b/dist/js/constants/hue_hex.js @@ -0,0 +1,299 @@ +"use strict"; +// Copyright 2023 Scape Agency BV +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hue_hex = void 0; +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ============================================================================ +// +// hue.gl +// 0.0.11 +// +// ============================================================================ +// General +// ============================================================================ +var hue_hex; +(function (hue_hex) { + // Grey + // ------------------------------------------------------------------------ + hue_hex["N0001"] = "#e2e2e2"; + hue_hex["N0002"] = "#cccccc"; + hue_hex["N0003"] = "#b6b6b6"; + hue_hex["N0004"] = "#a0a0a0"; + hue_hex["N0005"] = "#8b8b8b"; + hue_hex["N0006"] = "#777777"; + hue_hex["N0007"] = "#636363"; + hue_hex["N0008"] = "#505050"; + hue_hex["N0009"] = "#3e3e3e"; + // Salmon + // ------------------------------------------------------------------------ + hue_hex["N0151"] = "#fadbdd"; + hue_hex["N0152"] = "#eec0c4"; + hue_hex["N0153"] = "#e2a6ac"; + hue_hex["N0154"] = "#d48c94"; + hue_hex["N0155"] = "#c6727d"; + hue_hex["N0156"] = "#a7636b"; + hue_hex["N0157"] = "#89545a"; + hue_hex["N0158"] = "#6b4549"; + hue_hex["N0159"] = "#4f3739"; + // Orange + // ------------------------------------------------------------------------ + hue_hex["N0301"] = "#fadbd7"; + hue_hex["N0302"] = "#edc1bc"; + hue_hex["N0303"] = "#e0a8a1"; + hue_hex["N0304"] = "#d28e87"; + hue_hex["N0305"] = "#c4756e"; + hue_hex["N0306"] = "#a5655f"; + hue_hex["N0307"] = "#875650"; + hue_hex["N0308"] = "#6b4642"; + hue_hex["N0309"] = "#4f3835"; + // Amber + // ------------------------------------------------------------------------ + hue_hex["N0451"] = "#f8dcd3"; + hue_hex["N0452"] = "#eac3b5"; + hue_hex["N0453"] = "#dcaa98"; + hue_hex["N0454"] = "#cd927c"; + hue_hex["N0455"] = "#be7960"; + hue_hex["N0456"] = "#a06954"; + hue_hex["N0457"] = "#845848"; + hue_hex["N0458"] = "#68483c"; + hue_hex["N0459"] = "#4d3931"; + // Yellow + // ------------------------------------------------------------------------ + hue_hex["N0601"] = "#f4decf"; + hue_hex["N0602"] = "#e5c6af"; + hue_hex["N0603"] = "#d5ad90"; + hue_hex["N0604"] = "#c59672"; + hue_hex["N0605"] = "#b57f55"; + hue_hex["N0606"] = "#996d4b"; + hue_hex["N0607"] = "#7e5b41"; + hue_hex["N0608"] = "#644a38"; + hue_hex["N0609"] = "#4a3a2e"; + // Lime + // ------------------------------------------------------------------------ + hue_hex["N0751"] = "#efe0cc"; + hue_hex["N0752"] = "#dec8ac"; + hue_hex["N0753"] = "#cdb18c"; + hue_hex["N0754"] = "#bb9b6c"; + hue_hex["N0755"] = "#a9854e"; + hue_hex["N0756"] = "#8f7145"; + hue_hex["N0757"] = "#765f3d"; + hue_hex["N0758"] = "#5e4d34"; + hue_hex["N0759"] = "#473c2c"; + // Ecru + // ------------------------------------------------------------------------ + hue_hex["N0901"] = "#eae2cb"; + hue_hex["N0902"] = "#d6cbaa"; + hue_hex["N0903"] = "#c2b58a"; + hue_hex["N0904"] = "#af9f6a"; + hue_hex["N0905"] = "#9b8a4b"; + hue_hex["N0906"] = "#847643"; + hue_hex["N0907"] = "#6d623b"; + hue_hex["N0908"] = "#584f33"; + hue_hex["N0909"] = "#433d2b"; + // Olive + // ------------------------------------------------------------------------ + hue_hex["N1051"] = "#e3e4cc"; + hue_hex["N1052"] = "#cdceab"; + hue_hex["N1053"] = "#b7b98b"; + hue_hex["N1054"] = "#a1a46b"; + hue_hex["N1055"] = "#8b8f4c"; + hue_hex["N1056"] = "#777a44"; + hue_hex["N1057"] = "#63663c"; + hue_hex["N1058"] = "#505234"; + hue_hex["N1059"] = "#3e3f2c"; + // Green + // ------------------------------------------------------------------------ + hue_hex["N1201"] = "#dde6ce"; + hue_hex["N1202"] = "#c4d1ae"; + hue_hex["N1203"] = "#abbc8f"; + hue_hex["N1204"] = "#92a870"; + hue_hex["N1205"] = "#7a9453"; + hue_hex["N1206"] = "#697e49"; + hue_hex["N1207"] = "#586840"; + hue_hex["N1208"] = "#485437"; + hue_hex["N1209"] = "#39402d"; + // Forest + // ------------------------------------------------------------------------ + hue_hex["N1351"] = "#d7e7d2"; + hue_hex["N1352"] = "#bbd3b3"; + hue_hex["N1353"] = "#9fbf96"; + hue_hex["N1354"] = "#83ab79"; + hue_hex["N1355"] = "#68975d"; + hue_hex["N1356"] = "#5a8151"; + hue_hex["N1357"] = "#4d6b46"; + hue_hex["N1358"] = "#40553b"; + hue_hex["N1359"] = "#344130"; + // Jade + // ------------------------------------------------------------------------ + hue_hex["N1501"] = "#d1e8d6"; + hue_hex["N1502"] = "#b2d4ba"; + hue_hex["N1503"] = "#93c19f"; + hue_hex["N1504"] = "#74ad84"; + hue_hex["N1505"] = "#559a6a"; + hue_hex["N1506"] = "#4b835c"; + hue_hex["N1507"] = "#426c4e"; + hue_hex["N1508"] = "#395741"; + hue_hex["N1509"] = "#2f4234"; + // Mint + // ------------------------------------------------------------------------ + hue_hex["N1651"] = "#cde9dc"; + hue_hex["N1652"] = "#abd6c2"; + hue_hex["N1653"] = "#89c2a9"; + hue_hex["N1654"] = "#66af91"; + hue_hex["N1655"] = "#409b7a"; + hue_hex["N1656"] = "#3c8469"; + hue_hex["N1657"] = "#376d58"; + hue_hex["N1658"] = "#315848"; + hue_hex["N1659"] = "#2b4338"; + // Cyan + // ------------------------------------------------------------------------ + hue_hex["N1801"] = "#c9e9e2"; + hue_hex["N1802"] = "#a6d6cb"; + hue_hex["N1803"] = "#81c3b5"; + hue_hex["N1804"] = "#5baf9f"; + hue_hex["N1805"] = "#2a9c8a"; + hue_hex["N1806"] = "#2d8576"; + hue_hex["N1807"] = "#2d6e62"; + hue_hex["N1808"] = "#2b584f"; + hue_hex["N1809"] = "#28433d"; + // Teal + // ------------------------------------------------------------------------ + hue_hex["N1951"] = "#c8e9e8"; + hue_hex["N1952"] = "#a3d6d4"; + hue_hex["N1953"] = "#7dc3c0"; + hue_hex["N1954"] = "#53afad"; + hue_hex["N1955"] = "#109c9a"; + hue_hex["N1956"] = "#208583"; + hue_hex["N1957"] = "#266e6d"; + hue_hex["N1958"] = "#275857"; + hue_hex["N1959"] = "#264342"; + // Capri + // ------------------------------------------------------------------------ + hue_hex["N2101"] = "#c8e9ed"; + hue_hex["N2102"] = "#a3d5dc"; + hue_hex["N2103"] = "#7dc2cb"; + hue_hex["N2104"] = "#52aeba"; + hue_hex["N2105"] = "#019baa"; + hue_hex["N2106"] = "#1c8490"; + hue_hex["N2107"] = "#246d76"; + hue_hex["N2108"] = "#27575e"; + hue_hex["N2109"] = "#264246"; + // Sky + // ------------------------------------------------------------------------ + hue_hex["N2251"] = "#cae8f2"; + hue_hex["N2252"] = "#a6d4e3"; + hue_hex["N2253"] = "#81c0d4"; + hue_hex["N2254"] = "#58acc6"; + hue_hex["N2255"] = "#1a99b7"; + hue_hex["N2256"] = "#25829a"; + hue_hex["N2257"] = "#2a6c7e"; + hue_hex["N2258"] = "#2a5664"; + hue_hex["N2259"] = "#27424a"; + // Blue + // ------------------------------------------------------------------------ + hue_hex["N2401"] = "#cee6f6"; + hue_hex["N2402"] = "#acd2e9"; + hue_hex["N2403"] = "#8abedc"; + hue_hex["N2404"] = "#65aace"; + hue_hex["N2405"] = "#3696c1"; + hue_hex["N2406"] = "#3680a3"; + hue_hex["N2407"] = "#346a85"; + hue_hex["N2408"] = "#305568"; + hue_hex["N2409"] = "#2b414d"; + // Azure + // ------------------------------------------------------------------------ + hue_hex["N2551"] = "#d3e5f8"; + hue_hex["N2552"] = "#b5cfec"; + hue_hex["N2553"] = "#95bbe0"; + hue_hex["N2554"] = "#75a6d4"; + hue_hex["N2555"] = "#5192c8"; + hue_hex["N2556"] = "#497ca8"; + hue_hex["N2557"] = "#416789"; + hue_hex["N2558"] = "#39536b"; + hue_hex["N2559"] = "#303f4f"; + // Indigo + // ------------------------------------------------------------------------ + hue_hex["N2701"] = "#dae3f9"; + hue_hex["N2702"] = "#becdee"; + hue_hex["N2703"] = "#a3b7e2"; + hue_hex["N2704"] = "#87a2d6"; + hue_hex["N2705"] = "#6a8dca"; + hue_hex["N2706"] = "#5d78aa"; + hue_hex["N2707"] = "#4f648b"; + hue_hex["N2708"] = "#42516c"; + hue_hex["N2709"] = "#353e50"; + // Violet + // ------------------------------------------------------------------------ + hue_hex["N2851"] = "#e0e1f9"; + hue_hex["N2852"] = "#c8caed"; + hue_hex["N2853"] = "#b1b3e1"; + hue_hex["N2854"] = "#999dd5"; + hue_hex["N2855"] = "#8188c8"; + hue_hex["N2856"] = "#6f74a8"; + hue_hex["N2857"] = "#5d6189"; + hue_hex["N2858"] = "#4c4e6c"; + hue_hex["N2859"] = "#3b3c4f"; + // Magenta + // ------------------------------------------------------------------------ + hue_hex["N3001"] = "#e7dff6"; + hue_hex["N3002"] = "#d3c7e9"; + hue_hex["N3003"] = "#beafdc"; + hue_hex["N3004"] = "#aa98cf"; + hue_hex["N3005"] = "#9582c2"; + hue_hex["N3006"] = "#7f6fa3"; + hue_hex["N3007"] = "#6a5d86"; + hue_hex["N3008"] = "#554c69"; + hue_hex["N3009"] = "#413b4d"; + // Purple + // ------------------------------------------------------------------------ + hue_hex["N3151"] = "#edddf3"; + hue_hex["N3152"] = "#dcc4e4"; + hue_hex["N3153"] = "#caacd6"; + hue_hex["N3154"] = "#b994c7"; + hue_hex["N3155"] = "#a77cb9"; + hue_hex["N3156"] = "#8d6b9c"; + hue_hex["N3157"] = "#755a7f"; + hue_hex["N3158"] = "#5d4964"; + hue_hex["N3159"] = "#46394b"; + // Rose + // ------------------------------------------------------------------------ + hue_hex["N3301"] = "#f3dcee"; + hue_hex["N3302"] = "#e3c2dd"; + hue_hex["N3303"] = "#d4a9cd"; + hue_hex["N3304"] = "#c590bc"; + hue_hex["N3305"] = "#b577ac"; + hue_hex["N3306"] = "#996791"; + hue_hex["N3307"] = "#7d5777"; + hue_hex["N3308"] = "#63475f"; + hue_hex["N3309"] = "#4a3847"; + // Pink + // ------------------------------------------------------------------------ + hue_hex["N3451"] = "#f7dbe9"; + hue_hex["N3452"] = "#e9c1d5"; + hue_hex["N3453"] = "#dba7c2"; + hue_hex["N3454"] = "#cd8daf"; + hue_hex["N3455"] = "#bf739d"; + hue_hex["N3456"] = "#a16485"; + hue_hex["N3457"] = "#84546e"; + hue_hex["N3458"] = "#684658"; + hue_hex["N3459"] = "#4d3743"; + // Red + // ------------------------------------------------------------------------ + hue_hex["N3601"] = "#f9dbe3"; + hue_hex["N3602"] = "#edc0cd"; + hue_hex["N3603"] = "#e0a6b7"; + hue_hex["N3604"] = "#d38ca2"; + hue_hex["N3605"] = "#c5728d"; + hue_hex["N3606"] = "#a66278"; + hue_hex["N3607"] = "#885464"; + hue_hex["N3608"] = "#6b4551"; + hue_hex["N3609"] = "#4f373e"; +})(hue_hex || (exports.hue_hex = hue_hex = {})); diff --git a/dist/js/constants/hue_rgb.d.ts b/dist/js/constants/hue_rgb.d.ts new file mode 100644 index 0000000..b305d7a --- /dev/null +++ b/dist/js/constants/hue_rgb.d.ts @@ -0,0 +1,227 @@ +export declare enum hue_rgb { + N0001 = "rgb(226, 226, 226)", + N0002 = "rgb(204, 204, 204)", + N0003 = "rgb(182, 182, 182)", + N0004 = "rgb(160, 160, 160)", + N0005 = "rgb(139, 139, 139)", + N0006 = "rgb(119, 119, 119)", + N0007 = "rgb(99, 99, 99)", + N0008 = "rgb(80, 80, 80)", + N0009 = "rgb(62, 62, 62)", + N0151 = "rgb(250, 219, 221)", + N0152 = "rgb(238, 192, 196)", + N0153 = "rgb(226, 166, 172)", + N0154 = "rgb(212, 140, 148)", + N0155 = "rgb(198, 114, 125)", + N0156 = "rgb(167, 99, 107)", + N0157 = "rgb(137, 84, 90)", + N0158 = "rgb(107, 69, 73)", + N0159 = "rgb(79, 55, 57)", + N0301 = "rgb(250, 219, 215)", + N0302 = "rgb(237, 193, 188)", + N0303 = "rgb(224, 168, 161)", + N0304 = "rgb(210, 142, 135)", + N0305 = "rgb(196, 117, 110)", + N0306 = "rgb(165, 101, 95)", + N0307 = "rgb(135, 86, 80)", + N0308 = "rgb(107, 70, 66)", + N0309 = "rgb(79, 56, 53)", + N0451 = "rgb(248, 220, 211)", + N0452 = "rgb(234, 195, 181)", + N0453 = "rgb(220, 170, 152)", + N0454 = "rgb(205, 146, 124)", + N0455 = "rgb(190, 121, 96)", + N0456 = "rgb(160, 105, 84)", + N0457 = "rgb(132, 88, 72)", + N0458 = "rgb(104, 72, 60)", + N0459 = "rgb(77, 57, 49)", + N0601 = "rgb(244, 222, 207)", + N0602 = "rgb(229, 198, 175)", + N0603 = "rgb(213, 173, 144)", + N0604 = "rgb(197, 150, 114)", + N0605 = "rgb(181, 127, 85)", + N0606 = "rgb(153, 109, 75)", + N0607 = "rgb(126, 91, 65)", + N0608 = "rgb(100, 74, 56)", + N0609 = "rgb(74, 58, 46)", + N0751 = "rgb(239, 224, 204)", + N0752 = "rgb(222, 200, 172)", + N0753 = "rgb(205, 177, 140)", + N0754 = "rgb(187, 155, 108)", + N0755 = "rgb(169, 133, 78)", + N0756 = "rgb(143, 113, 69)", + N0757 = "rgb(118, 95, 61)", + N0758 = "rgb(94, 77, 52)", + N0759 = "rgb(71, 60, 44)", + N0901 = "rgb(234, 226, 203)", + N0902 = "rgb(214, 203, 170)", + N0903 = "rgb(194, 181, 138)", + N0904 = "rgb(175, 159, 106)", + N0905 = "rgb(155, 138, 75)", + N0906 = "rgb(132, 118, 67)", + N0907 = "rgb(109, 98, 59)", + N0908 = "rgb(88, 79, 51)", + N0909 = "rgb(67, 61, 43)", + N1051 = "rgb(227, 228, 204)", + N1052 = "rgb(205, 206, 171)", + N1053 = "rgb(183, 185, 139)", + N1054 = "rgb(161, 164, 107)", + N1055 = "rgb(139, 143, 76)", + N1056 = "rgb(119, 122, 68)", + N1057 = "rgb(99, 102, 60)", + N1058 = "rgb(80, 82, 52)", + N1059 = "rgb(62, 63, 44)", + N1201 = "rgb(221, 230, 206)", + N1202 = "rgb(196, 209, 174)", + N1203 = "rgb(171, 188, 143)", + N1204 = "rgb(146, 168, 112)", + N1205 = "rgb(122, 148, 83)", + N1206 = "rgb(105, 126, 73)", + N1207 = "rgb(88, 104, 64)", + N1208 = "rgb(72, 84, 55)", + N1209 = "rgb(57, 64, 45)", + N1351 = "rgb(215, 231, 210)", + N1352 = "rgb(187, 211, 179)", + N1353 = "rgb(159, 191, 150)", + N1354 = "rgb(131, 171, 121)", + N1355 = "rgb(104, 151, 93)", + N1356 = "rgb(90, 129, 81)", + N1357 = "rgb(77, 107, 70)", + N1358 = "rgb(64, 85, 59)", + N1359 = "rgb(52, 65, 48)", + N1501 = "rgb(209, 232, 214)", + N1502 = "rgb(178, 212, 186)", + N1503 = "rgb(147, 193, 159)", + N1504 = "rgb(116, 173, 132)", + N1505 = "rgb(85, 154, 106)", + N1506 = "rgb(75, 131, 92)", + N1507 = "rgb(66, 108, 78)", + N1508 = "rgb(57, 87, 65)", + N1509 = "rgb(47, 66, 52)", + N1651 = "rgb(205, 233, 220)", + N1652 = "rgb(171, 214, 194)", + N1653 = "rgb(137, 194, 169)", + N1654 = "rgb(102, 175, 145)", + N1655 = "rgb(64, 155, 122)", + N1656 = "rgb(60, 132, 105)", + N1657 = "rgb(55, 109, 88)", + N1658 = "rgb(49, 88, 72)", + N1659 = "rgb(43, 67, 56)", + N1801 = "rgb(201, 233, 226)", + N1802 = "rgb(166, 214, 203)", + N1803 = "rgb(129, 195, 181)", + N1804 = "rgb(91, 175, 159)", + N1805 = "rgb(42, 156, 138)", + N1806 = "rgb(45, 133, 118)", + N1807 = "rgb(45, 110, 98)", + N1808 = "rgb(43, 88, 79)", + N1809 = "rgb(40, 67, 61)", + N1951 = "rgb(200, 233, 232)", + N1952 = "rgb(163, 214, 212)", + N1953 = "rgb(125, 195, 192)", + N1954 = "rgb(83, 175, 173)", + N1955 = "rgb(16, 156, 154)", + N1956 = "rgb(32, 133, 131)", + N1957 = "rgb(38, 110, 109)", + N1958 = "rgb(39, 88, 87)", + N1959 = "rgb(38, 67, 66)", + N2101 = "rgb(200, 233, 237)", + N2102 = "rgb(163, 213, 220)", + N2103 = "rgb(125, 194, 203)", + N2104 = "rgb(82, 174, 186)", + N2105 = "rgb(1, 155, 170)", + N2106 = "rgb(28, 132, 144)", + N2107 = "rgb(36, 109, 118)", + N2108 = "rgb(39, 87, 94)", + N2109 = "rgb(38, 66, 70)", + N2251 = "rgb(202, 232, 242)", + N2252 = "rgb(166, 212, 227)", + N2253 = "rgb(129, 192, 212)", + N2254 = "rgb(88, 172, 198)", + N2255 = "rgb(26, 153, 183)", + N2256 = "rgb(37, 130, 154)", + N2257 = "rgb(42, 108, 126)", + N2258 = "rgb(42, 86, 100)", + N2259 = "rgb(39, 66, 74)", + N2401 = "rgb(206, 230, 246)", + N2402 = "rgb(172, 210, 233)", + N2403 = "rgb(138, 190, 220)", + N2404 = "rgb(101, 170, 206)", + N2405 = "rgb(54, 150, 193)", + N2406 = "rgb(54, 128, 163)", + N2407 = "rgb(52, 106, 133)", + N2408 = "rgb(48, 85, 104)", + N2409 = "rgb(43, 65, 77)", + N2551 = "rgb(211, 229, 248)", + N2552 = "rgb(181, 207, 236)", + N2553 = "rgb(149, 187, 224)", + N2554 = "rgb(117, 166, 212)", + N2555 = "rgb(81, 146, 200)", + N2556 = "rgb(73, 124, 168)", + N2557 = "rgb(65, 103, 137)", + N2558 = "rgb(57, 83, 107)", + N2559 = "rgb(48, 63, 79)", + N2701 = "rgb(218, 227, 249)", + N2702 = "rgb(190, 205, 238)", + N2703 = "rgb(163, 183, 226)", + N2704 = "rgb(135, 162, 214)", + N2705 = "rgb(106, 141, 202)", + N2706 = "rgb(93, 120, 170)", + N2707 = "rgb(79, 100, 139)", + N2708 = "rgb(66, 81, 108)", + N2709 = "rgb(53, 62, 80)", + N2851 = "rgb(224, 225, 249)", + N2852 = "rgb(200, 202, 237)", + N2853 = "rgb(177, 179, 225)", + N2854 = "rgb(153, 157, 213)", + N2855 = "rgb(129, 136, 200)", + N2856 = "rgb(111, 116, 168)", + N2857 = "rgb(93, 97, 137)", + N2858 = "rgb(76, 78, 108)", + N2859 = "rgb(59, 60, 79)", + N3001 = "rgb(231, 223, 246)", + N3002 = "rgb(211, 199, 233)", + N3003 = "rgb(190, 175, 220)", + N3004 = "rgb(170, 152, 207)", + N3005 = "rgb(149, 130, 194)", + N3006 = "rgb(127, 111, 163)", + N3007 = "rgb(106, 93, 134)", + N3008 = "rgb(85, 76, 105)", + N3009 = "rgb(65, 59, 77)", + N3151 = "rgb(237, 221, 243)", + N3152 = "rgb(220, 196, 228)", + N3153 = "rgb(202, 172, 214)", + N3154 = "rgb(185, 148, 199)", + N3155 = "rgb(167, 124, 185)", + N3156 = "rgb(141, 107, 156)", + N3157 = "rgb(117, 90, 127)", + N3158 = "rgb(93, 73, 100)", + N3159 = "rgb(70, 57, 75)", + N3301 = "rgb(243, 220, 238)", + N3302 = "rgb(227, 194, 221)", + N3303 = "rgb(212, 169, 205)", + N3304 = "rgb(197, 144, 188)", + N3305 = "rgb(181, 119, 172)", + N3306 = "rgb(153, 103, 145)", + N3307 = "rgb(125, 87, 119)", + N3308 = "rgb(99, 71, 95)", + N3309 = "rgb(74, 56, 71)", + N3451 = "rgb(247, 219, 233)", + N3452 = "rgb(233, 193, 213)", + N3453 = "rgb(219, 167, 194)", + N3454 = "rgb(205, 141, 175)", + N3455 = "rgb(191, 115, 157)", + N3456 = "rgb(161, 100, 133)", + N3457 = "rgb(132, 84, 110)", + N3458 = "rgb(104, 70, 88)", + N3459 = "rgb(77, 55, 67)", + N3601 = "rgb(249, 219, 227)", + N3602 = "rgb(237, 192, 205)", + N3603 = "rgb(224, 166, 183)", + N3604 = "rgb(211, 140, 162)", + N3605 = "rgb(197, 114, 141)", + N3606 = "rgb(166, 98, 120)", + N3607 = "rgb(136, 84, 100)", + N3608 = "rgb(107, 69, 81)", + N3609 = "rgb(79, 55, 62)" +} diff --git a/dist/js/constants/hue_rgb.js b/dist/js/constants/hue_rgb.js new file mode 100644 index 0000000..65a7b32 --- /dev/null +++ b/dist/js/constants/hue_rgb.js @@ -0,0 +1,299 @@ +"use strict"; +// Copyright 2023 Scape Agency BV +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hue_rgb = void 0; +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ============================================================================ +// +// hue.gl +// 0.0.11 +// +// ============================================================================ +// General +// ============================================================================ +var hue_rgb; +(function (hue_rgb) { + // Grey + // ------------------------------------------------------------------------ + hue_rgb["N0001"] = "rgb(226, 226, 226)"; + hue_rgb["N0002"] = "rgb(204, 204, 204)"; + hue_rgb["N0003"] = "rgb(182, 182, 182)"; + hue_rgb["N0004"] = "rgb(160, 160, 160)"; + hue_rgb["N0005"] = "rgb(139, 139, 139)"; + hue_rgb["N0006"] = "rgb(119, 119, 119)"; + hue_rgb["N0007"] = "rgb(99, 99, 99)"; + hue_rgb["N0008"] = "rgb(80, 80, 80)"; + hue_rgb["N0009"] = "rgb(62, 62, 62)"; + // Salmon + // ------------------------------------------------------------------------ + hue_rgb["N0151"] = "rgb(250, 219, 221)"; + hue_rgb["N0152"] = "rgb(238, 192, 196)"; + hue_rgb["N0153"] = "rgb(226, 166, 172)"; + hue_rgb["N0154"] = "rgb(212, 140, 148)"; + hue_rgb["N0155"] = "rgb(198, 114, 125)"; + hue_rgb["N0156"] = "rgb(167, 99, 107)"; + hue_rgb["N0157"] = "rgb(137, 84, 90)"; + hue_rgb["N0158"] = "rgb(107, 69, 73)"; + hue_rgb["N0159"] = "rgb(79, 55, 57)"; + // Orange + // ------------------------------------------------------------------------ + hue_rgb["N0301"] = "rgb(250, 219, 215)"; + hue_rgb["N0302"] = "rgb(237, 193, 188)"; + hue_rgb["N0303"] = "rgb(224, 168, 161)"; + hue_rgb["N0304"] = "rgb(210, 142, 135)"; + hue_rgb["N0305"] = "rgb(196, 117, 110)"; + hue_rgb["N0306"] = "rgb(165, 101, 95)"; + hue_rgb["N0307"] = "rgb(135, 86, 80)"; + hue_rgb["N0308"] = "rgb(107, 70, 66)"; + hue_rgb["N0309"] = "rgb(79, 56, 53)"; + // Amber + // ------------------------------------------------------------------------ + hue_rgb["N0451"] = "rgb(248, 220, 211)"; + hue_rgb["N0452"] = "rgb(234, 195, 181)"; + hue_rgb["N0453"] = "rgb(220, 170, 152)"; + hue_rgb["N0454"] = "rgb(205, 146, 124)"; + hue_rgb["N0455"] = "rgb(190, 121, 96)"; + hue_rgb["N0456"] = "rgb(160, 105, 84)"; + hue_rgb["N0457"] = "rgb(132, 88, 72)"; + hue_rgb["N0458"] = "rgb(104, 72, 60)"; + hue_rgb["N0459"] = "rgb(77, 57, 49)"; + // Yellow + // ------------------------------------------------------------------------ + hue_rgb["N0601"] = "rgb(244, 222, 207)"; + hue_rgb["N0602"] = "rgb(229, 198, 175)"; + hue_rgb["N0603"] = "rgb(213, 173, 144)"; + hue_rgb["N0604"] = "rgb(197, 150, 114)"; + hue_rgb["N0605"] = "rgb(181, 127, 85)"; + hue_rgb["N0606"] = "rgb(153, 109, 75)"; + hue_rgb["N0607"] = "rgb(126, 91, 65)"; + hue_rgb["N0608"] = "rgb(100, 74, 56)"; + hue_rgb["N0609"] = "rgb(74, 58, 46)"; + // Lime + // ------------------------------------------------------------------------ + hue_rgb["N0751"] = "rgb(239, 224, 204)"; + hue_rgb["N0752"] = "rgb(222, 200, 172)"; + hue_rgb["N0753"] = "rgb(205, 177, 140)"; + hue_rgb["N0754"] = "rgb(187, 155, 108)"; + hue_rgb["N0755"] = "rgb(169, 133, 78)"; + hue_rgb["N0756"] = "rgb(143, 113, 69)"; + hue_rgb["N0757"] = "rgb(118, 95, 61)"; + hue_rgb["N0758"] = "rgb(94, 77, 52)"; + hue_rgb["N0759"] = "rgb(71, 60, 44)"; + // Ecru + // ------------------------------------------------------------------------ + hue_rgb["N0901"] = "rgb(234, 226, 203)"; + hue_rgb["N0902"] = "rgb(214, 203, 170)"; + hue_rgb["N0903"] = "rgb(194, 181, 138)"; + hue_rgb["N0904"] = "rgb(175, 159, 106)"; + hue_rgb["N0905"] = "rgb(155, 138, 75)"; + hue_rgb["N0906"] = "rgb(132, 118, 67)"; + hue_rgb["N0907"] = "rgb(109, 98, 59)"; + hue_rgb["N0908"] = "rgb(88, 79, 51)"; + hue_rgb["N0909"] = "rgb(67, 61, 43)"; + // Olive + // ------------------------------------------------------------------------ + hue_rgb["N1051"] = "rgb(227, 228, 204)"; + hue_rgb["N1052"] = "rgb(205, 206, 171)"; + hue_rgb["N1053"] = "rgb(183, 185, 139)"; + hue_rgb["N1054"] = "rgb(161, 164, 107)"; + hue_rgb["N1055"] = "rgb(139, 143, 76)"; + hue_rgb["N1056"] = "rgb(119, 122, 68)"; + hue_rgb["N1057"] = "rgb(99, 102, 60)"; + hue_rgb["N1058"] = "rgb(80, 82, 52)"; + hue_rgb["N1059"] = "rgb(62, 63, 44)"; + // Green + // ------------------------------------------------------------------------ + hue_rgb["N1201"] = "rgb(221, 230, 206)"; + hue_rgb["N1202"] = "rgb(196, 209, 174)"; + hue_rgb["N1203"] = "rgb(171, 188, 143)"; + hue_rgb["N1204"] = "rgb(146, 168, 112)"; + hue_rgb["N1205"] = "rgb(122, 148, 83)"; + hue_rgb["N1206"] = "rgb(105, 126, 73)"; + hue_rgb["N1207"] = "rgb(88, 104, 64)"; + hue_rgb["N1208"] = "rgb(72, 84, 55)"; + hue_rgb["N1209"] = "rgb(57, 64, 45)"; + // Forest + // ------------------------------------------------------------------------ + hue_rgb["N1351"] = "rgb(215, 231, 210)"; + hue_rgb["N1352"] = "rgb(187, 211, 179)"; + hue_rgb["N1353"] = "rgb(159, 191, 150)"; + hue_rgb["N1354"] = "rgb(131, 171, 121)"; + hue_rgb["N1355"] = "rgb(104, 151, 93)"; + hue_rgb["N1356"] = "rgb(90, 129, 81)"; + hue_rgb["N1357"] = "rgb(77, 107, 70)"; + hue_rgb["N1358"] = "rgb(64, 85, 59)"; + hue_rgb["N1359"] = "rgb(52, 65, 48)"; + // Jade + // ------------------------------------------------------------------------ + hue_rgb["N1501"] = "rgb(209, 232, 214)"; + hue_rgb["N1502"] = "rgb(178, 212, 186)"; + hue_rgb["N1503"] = "rgb(147, 193, 159)"; + hue_rgb["N1504"] = "rgb(116, 173, 132)"; + hue_rgb["N1505"] = "rgb(85, 154, 106)"; + hue_rgb["N1506"] = "rgb(75, 131, 92)"; + hue_rgb["N1507"] = "rgb(66, 108, 78)"; + hue_rgb["N1508"] = "rgb(57, 87, 65)"; + hue_rgb["N1509"] = "rgb(47, 66, 52)"; + // Mint + // ------------------------------------------------------------------------ + hue_rgb["N1651"] = "rgb(205, 233, 220)"; + hue_rgb["N1652"] = "rgb(171, 214, 194)"; + hue_rgb["N1653"] = "rgb(137, 194, 169)"; + hue_rgb["N1654"] = "rgb(102, 175, 145)"; + hue_rgb["N1655"] = "rgb(64, 155, 122)"; + hue_rgb["N1656"] = "rgb(60, 132, 105)"; + hue_rgb["N1657"] = "rgb(55, 109, 88)"; + hue_rgb["N1658"] = "rgb(49, 88, 72)"; + hue_rgb["N1659"] = "rgb(43, 67, 56)"; + // Cyan + // ------------------------------------------------------------------------ + hue_rgb["N1801"] = "rgb(201, 233, 226)"; + hue_rgb["N1802"] = "rgb(166, 214, 203)"; + hue_rgb["N1803"] = "rgb(129, 195, 181)"; + hue_rgb["N1804"] = "rgb(91, 175, 159)"; + hue_rgb["N1805"] = "rgb(42, 156, 138)"; + hue_rgb["N1806"] = "rgb(45, 133, 118)"; + hue_rgb["N1807"] = "rgb(45, 110, 98)"; + hue_rgb["N1808"] = "rgb(43, 88, 79)"; + hue_rgb["N1809"] = "rgb(40, 67, 61)"; + // Teal + // ------------------------------------------------------------------------ + hue_rgb["N1951"] = "rgb(200, 233, 232)"; + hue_rgb["N1952"] = "rgb(163, 214, 212)"; + hue_rgb["N1953"] = "rgb(125, 195, 192)"; + hue_rgb["N1954"] = "rgb(83, 175, 173)"; + hue_rgb["N1955"] = "rgb(16, 156, 154)"; + hue_rgb["N1956"] = "rgb(32, 133, 131)"; + hue_rgb["N1957"] = "rgb(38, 110, 109)"; + hue_rgb["N1958"] = "rgb(39, 88, 87)"; + hue_rgb["N1959"] = "rgb(38, 67, 66)"; + // Capri + // ------------------------------------------------------------------------ + hue_rgb["N2101"] = "rgb(200, 233, 237)"; + hue_rgb["N2102"] = "rgb(163, 213, 220)"; + hue_rgb["N2103"] = "rgb(125, 194, 203)"; + hue_rgb["N2104"] = "rgb(82, 174, 186)"; + hue_rgb["N2105"] = "rgb(1, 155, 170)"; + hue_rgb["N2106"] = "rgb(28, 132, 144)"; + hue_rgb["N2107"] = "rgb(36, 109, 118)"; + hue_rgb["N2108"] = "rgb(39, 87, 94)"; + hue_rgb["N2109"] = "rgb(38, 66, 70)"; + // Sky + // ------------------------------------------------------------------------ + hue_rgb["N2251"] = "rgb(202, 232, 242)"; + hue_rgb["N2252"] = "rgb(166, 212, 227)"; + hue_rgb["N2253"] = "rgb(129, 192, 212)"; + hue_rgb["N2254"] = "rgb(88, 172, 198)"; + hue_rgb["N2255"] = "rgb(26, 153, 183)"; + hue_rgb["N2256"] = "rgb(37, 130, 154)"; + hue_rgb["N2257"] = "rgb(42, 108, 126)"; + hue_rgb["N2258"] = "rgb(42, 86, 100)"; + hue_rgb["N2259"] = "rgb(39, 66, 74)"; + // Blue + // ------------------------------------------------------------------------ + hue_rgb["N2401"] = "rgb(206, 230, 246)"; + hue_rgb["N2402"] = "rgb(172, 210, 233)"; + hue_rgb["N2403"] = "rgb(138, 190, 220)"; + hue_rgb["N2404"] = "rgb(101, 170, 206)"; + hue_rgb["N2405"] = "rgb(54, 150, 193)"; + hue_rgb["N2406"] = "rgb(54, 128, 163)"; + hue_rgb["N2407"] = "rgb(52, 106, 133)"; + hue_rgb["N2408"] = "rgb(48, 85, 104)"; + hue_rgb["N2409"] = "rgb(43, 65, 77)"; + // Azure + // ------------------------------------------------------------------------ + hue_rgb["N2551"] = "rgb(211, 229, 248)"; + hue_rgb["N2552"] = "rgb(181, 207, 236)"; + hue_rgb["N2553"] = "rgb(149, 187, 224)"; + hue_rgb["N2554"] = "rgb(117, 166, 212)"; + hue_rgb["N2555"] = "rgb(81, 146, 200)"; + hue_rgb["N2556"] = "rgb(73, 124, 168)"; + hue_rgb["N2557"] = "rgb(65, 103, 137)"; + hue_rgb["N2558"] = "rgb(57, 83, 107)"; + hue_rgb["N2559"] = "rgb(48, 63, 79)"; + // Indigo + // ------------------------------------------------------------------------ + hue_rgb["N2701"] = "rgb(218, 227, 249)"; + hue_rgb["N2702"] = "rgb(190, 205, 238)"; + hue_rgb["N2703"] = "rgb(163, 183, 226)"; + hue_rgb["N2704"] = "rgb(135, 162, 214)"; + hue_rgb["N2705"] = "rgb(106, 141, 202)"; + hue_rgb["N2706"] = "rgb(93, 120, 170)"; + hue_rgb["N2707"] = "rgb(79, 100, 139)"; + hue_rgb["N2708"] = "rgb(66, 81, 108)"; + hue_rgb["N2709"] = "rgb(53, 62, 80)"; + // Violet + // ------------------------------------------------------------------------ + hue_rgb["N2851"] = "rgb(224, 225, 249)"; + hue_rgb["N2852"] = "rgb(200, 202, 237)"; + hue_rgb["N2853"] = "rgb(177, 179, 225)"; + hue_rgb["N2854"] = "rgb(153, 157, 213)"; + hue_rgb["N2855"] = "rgb(129, 136, 200)"; + hue_rgb["N2856"] = "rgb(111, 116, 168)"; + hue_rgb["N2857"] = "rgb(93, 97, 137)"; + hue_rgb["N2858"] = "rgb(76, 78, 108)"; + hue_rgb["N2859"] = "rgb(59, 60, 79)"; + // Magenta + // ------------------------------------------------------------------------ + hue_rgb["N3001"] = "rgb(231, 223, 246)"; + hue_rgb["N3002"] = "rgb(211, 199, 233)"; + hue_rgb["N3003"] = "rgb(190, 175, 220)"; + hue_rgb["N3004"] = "rgb(170, 152, 207)"; + hue_rgb["N3005"] = "rgb(149, 130, 194)"; + hue_rgb["N3006"] = "rgb(127, 111, 163)"; + hue_rgb["N3007"] = "rgb(106, 93, 134)"; + hue_rgb["N3008"] = "rgb(85, 76, 105)"; + hue_rgb["N3009"] = "rgb(65, 59, 77)"; + // Purple + // ------------------------------------------------------------------------ + hue_rgb["N3151"] = "rgb(237, 221, 243)"; + hue_rgb["N3152"] = "rgb(220, 196, 228)"; + hue_rgb["N3153"] = "rgb(202, 172, 214)"; + hue_rgb["N3154"] = "rgb(185, 148, 199)"; + hue_rgb["N3155"] = "rgb(167, 124, 185)"; + hue_rgb["N3156"] = "rgb(141, 107, 156)"; + hue_rgb["N3157"] = "rgb(117, 90, 127)"; + hue_rgb["N3158"] = "rgb(93, 73, 100)"; + hue_rgb["N3159"] = "rgb(70, 57, 75)"; + // Rose + // ------------------------------------------------------------------------ + hue_rgb["N3301"] = "rgb(243, 220, 238)"; + hue_rgb["N3302"] = "rgb(227, 194, 221)"; + hue_rgb["N3303"] = "rgb(212, 169, 205)"; + hue_rgb["N3304"] = "rgb(197, 144, 188)"; + hue_rgb["N3305"] = "rgb(181, 119, 172)"; + hue_rgb["N3306"] = "rgb(153, 103, 145)"; + hue_rgb["N3307"] = "rgb(125, 87, 119)"; + hue_rgb["N3308"] = "rgb(99, 71, 95)"; + hue_rgb["N3309"] = "rgb(74, 56, 71)"; + // Pink + // ------------------------------------------------------------------------ + hue_rgb["N3451"] = "rgb(247, 219, 233)"; + hue_rgb["N3452"] = "rgb(233, 193, 213)"; + hue_rgb["N3453"] = "rgb(219, 167, 194)"; + hue_rgb["N3454"] = "rgb(205, 141, 175)"; + hue_rgb["N3455"] = "rgb(191, 115, 157)"; + hue_rgb["N3456"] = "rgb(161, 100, 133)"; + hue_rgb["N3457"] = "rgb(132, 84, 110)"; + hue_rgb["N3458"] = "rgb(104, 70, 88)"; + hue_rgb["N3459"] = "rgb(77, 55, 67)"; + // Red + // ------------------------------------------------------------------------ + hue_rgb["N3601"] = "rgb(249, 219, 227)"; + hue_rgb["N3602"] = "rgb(237, 192, 205)"; + hue_rgb["N3603"] = "rgb(224, 166, 183)"; + hue_rgb["N3604"] = "rgb(211, 140, 162)"; + hue_rgb["N3605"] = "rgb(197, 114, 141)"; + hue_rgb["N3606"] = "rgb(166, 98, 120)"; + hue_rgb["N3607"] = "rgb(136, 84, 100)"; + hue_rgb["N3608"] = "rgb(107, 69, 81)"; + hue_rgb["N3609"] = "rgb(79, 55, 62)"; +})(hue_rgb || (exports.hue_rgb = hue_rgb = {})); diff --git a/dist/js/constants/index.d.ts b/dist/js/constants/index.d.ts new file mode 100644 index 0000000..4914768 --- /dev/null +++ b/dist/js/constants/index.d.ts @@ -0,0 +1,3 @@ +export { hue_hex } from './hue_hex'; +export { hue_hcl } from './hue_hcl'; +export { hue_rgb } from './hue_rgb'; diff --git a/dist/js/constants/index.js b/dist/js/constants/index.js new file mode 100644 index 0000000..6a7c4d4 --- /dev/null +++ b/dist/js/constants/index.js @@ -0,0 +1,19 @@ +"use strict"; +// Copyright 2024 Scape Agency BV +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hue_rgb = exports.hue_hcl = exports.hue_hex = void 0; +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +var hue_hex_1 = require("./hue_hex"); +Object.defineProperty(exports, "hue_hex", { enumerable: true, get: function () { return hue_hex_1.hue_hex; } }); +var hue_hcl_1 = require("./hue_hcl"); +Object.defineProperty(exports, "hue_hcl", { enumerable: true, get: function () { return hue_hcl_1.hue_hcl; } }); +var hue_rgb_1 = require("./hue_rgb"); +Object.defineProperty(exports, "hue_rgb", { enumerable: true, get: function () { return hue_rgb_1.hue_rgb; } }); diff --git a/dist/js/hue.gl.min.js b/dist/js/hue.gl.min.js index 0ae1b53..8648d04 100644 --- a/dist/js/hue.gl.min.js +++ b/dist/js/hue.gl.min.js @@ -1 +1 @@ -"use strict";Object.defineProperty(exports,"t",{value:!0}); \ No newline at end of file +"use strict";Object.defineProperty(exports,"t",{value:!0}),exports.o=exports.u=exports.p=exports.i=exports.l=exports.m=exports.h=exports.j=void 0;var e=require("./color");Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return e.j}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return e.h}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return e.m}});var r=require("./config");Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return r.l}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return r.i}});var t=require("./constants");Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return t.p}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return t.u}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return t.o}}); \ No newline at end of file diff --git a/dist/js/index.d.ts b/dist/js/index.d.ts index cb0ff5c..9a37ab8 100644 --- a/dist/js/index.d.ts +++ b/dist/js/index.d.ts @@ -1 +1,3 @@ -export {}; +export { ColorPicker, ColorScheme, ColorSwatch, } from './color'; +export { hueConfig, hueNames, } from './config'; +export { hue_hex, hue_hcl, hue_rgb, } from './constants'; diff --git a/dist/js/index.js b/dist/js/index.js index fd2774c..3f924a3 100644 --- a/dist/js/index.js +++ b/dist/js/index.js @@ -1,3 +1,24 @@ "use strict"; -// Copyright 2020 Scape Agency BV +// Copyright 2024 Scape Agency BV Object.defineProperty(exports, "__esModule", { value: true }); +exports.hue_rgb = exports.hue_hcl = exports.hue_hex = exports.hueNames = exports.hueConfig = exports.ColorSwatch = exports.ColorScheme = exports.ColorPicker = void 0; +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +var color_1 = require("./color"); +Object.defineProperty(exports, "ColorPicker", { enumerable: true, get: function () { return color_1.ColorPicker; } }); +Object.defineProperty(exports, "ColorScheme", { enumerable: true, get: function () { return color_1.ColorScheme; } }); +Object.defineProperty(exports, "ColorSwatch", { enumerable: true, get: function () { return color_1.ColorSwatch; } }); +var config_1 = require("./config"); +Object.defineProperty(exports, "hueConfig", { enumerable: true, get: function () { return config_1.hueConfig; } }); +Object.defineProperty(exports, "hueNames", { enumerable: true, get: function () { return config_1.hueNames; } }); +var constants_1 = require("./constants"); +Object.defineProperty(exports, "hue_hex", { enumerable: true, get: function () { return constants_1.hue_hex; } }); +Object.defineProperty(exports, "hue_hcl", { enumerable: true, get: function () { return constants_1.hue_hcl; } }); +Object.defineProperty(exports, "hue_rgb", { enumerable: true, get: function () { return constants_1.hue_rgb; } }); diff --git a/dist/js/util.d.ts b/dist/js/util.d.ts new file mode 100644 index 0000000..5e07c04 --- /dev/null +++ b/dist/js/util.d.ts @@ -0,0 +1,11 @@ +export declare function rgb2cmyk(r: number, g: number, b: number, normalized: any): { + c: number; + m: number; + y: number; + k: number; +}; +export declare function colorToHex(color: { + toString: (arg0: number) => any; +}): any; +export declare function convertRGBtoHex(red: any, green: any, blue: any): string; +export declare function pad(num: string | any[], size: number, char: any): string; diff --git a/dist/js/util.js b/dist/js/util.js new file mode 100644 index 0000000..6289a14 --- /dev/null +++ b/dist/js/util.js @@ -0,0 +1,47 @@ +"use strict"; +// import Color from "https://colorjs.io/dist/color.js"; +// import Chroma from "https://cdnjs.cloudflare.com/ajax/libs/chroma-js/2.4.2/chroma.min.js"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pad = exports.convertRGBtoHex = exports.colorToHex = exports.rgb2cmyk = void 0; +function rgb2cmyk(r, g, b, normalized) { + var c = 1 - (r / 255); + var m = 1 - (g / 255); + var y = 1 - (b / 255); + var k = Math.min(c, Math.min(m, y)); + c = (c - k) / (1 - k); + m = (m - k) / (1 - k); + y = (y - k) / (1 - k); + if (!normalized) { + c = Math.round(c * 10000) / 100; + m = Math.round(m * 10000) / 100; + y = Math.round(y * 10000) / 100; + k = Math.round(k * 10000) / 100; + } + c = isNaN(c) ? 0 : c; + m = isNaN(m) ? 0 : m; + y = isNaN(y) ? 0 : y; + k = isNaN(k) ? 0 : k; + return { + c: c, + m: m, + y: y, + k: k + }; +} +exports.rgb2cmyk = rgb2cmyk; +function colorToHex(color) { + var hexadecimal = color.toString(16); + return hexadecimal.length == 1 ? "0" + hexadecimal : hexadecimal; +} +exports.colorToHex = colorToHex; +function convertRGBtoHex(red, green, blue) { + return "#" + colorToHex(red) + colorToHex(green) + colorToHex(blue); +} +exports.convertRGBtoHex = convertRGBtoHex; +function pad(num, size, char) { + num = num.toString(); + while (num.length < size) + num = char + num; + return num; +} +exports.pad = pad; diff --git a/dist/package.json b/dist/package.json index e283844..0dc2be3 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "hue.gl", - "version": "0.0.10", + "version": "0.0.11", "description": "hue.gl is a colour palette developed by Scape Agency.", "keywords": [ "hue.gl", diff --git a/dist/py/hue.gl.py b/dist/py/hue.gl.py index c8a535b..fb36f93 100644 --- a/dist/py/hue.gl.py +++ b/dist/py/hue.gl.py @@ -15,7 +15,7 @@ # ============================================================================= # # hue.gl -# 0.0.10 +# 0.0.11 # # ============================================================================= diff --git a/dist/rcpx/hue.gl.rcpx b/dist/rcpx/hue.gl.rcpx index f7f21e1..a344667 100644 --- a/dist/rcpx/hue.gl.rcpx +++ b/dist/rcpx/hue.gl.rcpx @@ -1,6 +1,6 @@ - + >; + + constructor(config: ColorSchemeConfig, names: any) { + // Initialize colorList and other properties based on config + this.config = config; + this.names = names; + this.colorList = []; + this.colorDict = {}; + this.initializeColors(); + } + + private initializeColors(): void { + // Logic to initialize colorList based on the provided configuration + + const l_count = Math.ceil(this.config.p_count / 2); + const d_count = Math.floor(this.config.p_count / 2); + const d_l_min = this.config.l_l_min + (this.config.l_l_step * (l_count-1)); + const d_c_min = this.config.l_c_min + (this.config.l_c_step * (l_count-1)); + + // Create LC lists + // -------------------------------------------------------------------- + // const l_list = [0]; + // const c_list = [0]; + const l_list = []; + const c_list = []; + for (let i = 0; i < this.config.p_count; i ++) { + let l_cur = this.config.l_l_min + this.config.l_l_step + i * this.config.l_l_step -2*i; + l_list.push(l_cur); + }; + for (let i = 0; i < l_count; i ++) { + let c_cur = this.config.l_c_min + i * this.config.l_c_step; + c_list.push(c_cur); + }; + for (let i = 0; i < d_count; i ++) { + let c_cur = d_c_min + this.config.d_c_step + i *this.config.d_c_step; + c_list.push(c_cur); + }; + + // Create hue.gl + // -------------------------------------------------------------------- + // for (let h = this.config.h_step; h <= 360; h += this.config.h_step) { + for (let h = 0; h <= 360; h += this.config.h_step) { + + let h_group: Record = {}; + // let h_group_name = h.toString(); + let h_group_name = this.names[h];; + + + + for (let i = 0; i < this.config.p_count; i ++) { + let l_cur = l_list[i]; + let c_cur = c_list[i]; + if (h == 0) { + c_cur = 0; + }; + + let name = this.config.prefix + pad(h.toString(), 3, "0") + (i + 1).toString(); + let color = new ColorSwatch(h, c_cur, l_cur, name) + this.colorList.push(color); + h_group[name] = color; + }; + + this.colorDict[h_group_name] = h_group; + + } + } + + public getColorList(): ColorSwatch[] { + return this.colorList; + } + + public getColorDict(): Record> { + return this.colorDict; + } + +} diff --git a/dist/ts/color/ColorSwatch.ts b/dist/ts/color/ColorSwatch.ts new file mode 100644 index 0000000..013bbdc --- /dev/null +++ b/dist/ts/color/ColorSwatch.ts @@ -0,0 +1,327 @@ + +// Copyright 2023 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +// ============================================================================ +// Import +// ============================================================================ + +import Color from 'colorjs.io'; +import { rgb2cmyk, convertRGBtoHex } from '../util.js'; + + +// ============================================================================ +// Classes +// ============================================================================ + +export class ColorSwatch { + public name?: string; + public h: number = 0; // Hue (0-360) + public c: number = 0; // Chroma (0-100) + public l: number = 0; // Luminance (0-100) + public model: Color; + + constructor(h: number, c: number, l: number, name?: string) { + if (h < 0 || h > 360 || c < 0 || c > 100 || l < 0 || l > 100) { + throw new Error("Invalid HCL values"); + } + this.h = h; + this.c = c; + this.l = l; + // this.setHCL(h, c, l); + this.name = name; + this.model = new Color("lch", [l, c, h]);; + } + + setHCL(h: number, c: number, l: number): void { + if (h < 0 || h > 360 || c < 0 || c > 100 || l < 0 || l > 100) { + throw new Error("Invalid HCL values"); + } + this.h = h; + this.c = c; + this.l = l; + } + + /// Color Gamut Checks + checkGamut(color_constant: Color): boolean { + let lch_in_gamut = (color_constant.to("lch")).inGamut(); + let srgb_in_gamut = (color_constant.to("srgb")).inGamut(); + let argb_in_gamut = (color_constant.to("a98rgb")).inGamut(); + // console.log(argb_in_gamut); + + let in_gamut; + if ( + lch_in_gamut == false || + srgb_in_gamut == false || + argb_in_gamut == false + ) { + in_gamut = false; + // color_object = new Color("white"); + } else { + in_gamut = true; + + } + return in_gamut; + } + + + + getName(): string | undefined { + return this.name; + } + + // HCL(): [number, number, number] { + // return [this.h, this.c, this.l]; + // } + + getRGB(): [number, number, number] { + // const color_constant = new Color("lch", [l, c, h]); + // let color_object = color_constant + // Convert HCL to RGB here + // This is a non-trivial conversion and may require a detailed algorithm or library + // Placeholder for conversion logic + return [0, 0, 0]; // Replace with actual conversion logic + } + + // Color Space Conversions + // ======================================================================== + + a98rgb() { + let color = this.model.to("a98rgb"); + return color.coords; + } + + a98rgb_linear() { + let color = this.model.to("a98rgb-linear"); + return color.coords; + } + + acescg() { + let color = this.model.to("acescg"); + return color.coords; + } + + hsl() { + let color = this.model.to("hsl"); + return color.coords; + } + + hsv() { + let color = this.model.to("hsv"); + return color.coords; + } + + hwb() { + let color = this.model.to("hwb"); + return color.coords; + } + + ictcp() { + let color = this.model.to("ictcp"); + return color.coords; + } + + jzczhz() { + let color = this.model.to("jzczhz"); + return color.coords; + } + + jzazbz() { + let color = this.model.to("jzazbz"); + return color.coords; + } + + lab() { + let color = this.model.to("lab"); + return color.coords; + } + + lab_d65() { + let color = this.model.to("lab-d65"); + return color.coords; + } + + lch() { + let color = this.model.to("lch"); + return color.coords; + } + + oklch() { + let color = this.model.to("oklch"); + return color.coords; + } + + oklab() { + let color = this.model.to("oklab"); + return color.coords; + } + + p3() { + let color = this.model.to("p3"); + return color.coords; + } + + p3_linear() { + let color = this.model.to("p3-linear"); + return color.coords; + } + + prophoto() { + let color = this.model.to("prophoto"); + return color.coords; + } + + prophoto_linear() { + let color = this.model.to("prophoto-linear"); + return color.coords; + } + + rec2020() { + let color = this.model.to("rec2020"); + return color.coords; + } + + rec2020_linear() { + let color = this.model.to("rec2020-linear"); + return color.coords; + } + + rec2100hlg() { + let color = this.model.to("rec2100hlg"); + return color.coords; + } + + rec2100pq() { + let color = this.model.to("rec2100pq"); + return color.coords; + } + + xyz_abs_d65() { + let color = this.model.to("xyz-abs-d65"); + return color.coords; + } + + xyz_d50() { + let color = this.model.to("xyz-d50"); + return color.coords; + } + + xyz_d65() { + let color = this.model.to("xyz-d65"); + return color.coords; + } + + xyz() { + let color = this.model.to("xyz"); + return color.coords; + } + + srgb() { + let color = this.model.to("srgb"); + return color; + } + + srgb_linear() { + let color = this.model.to("srgb-linear"); + return color.coords; + } + + hex() { + + let color = this.srgb(); + let hex = convertRGBtoHex( + Math.round(color.coords[0]*255), + Math.round(color.coords[1]*255), + Math.round(color.coords[2]*255), + ); + // console.log(color.coords[0]); + return hex; + + } + + hcl() { + + let hcl = { + "h": this.h, + "c": this.c, + "l": this.l, + } + return hcl; + + + } + // rgb() { + // let color = this.srgb(); + + // let rgb = ( + // Math.round(color.coords[0]*255), + // Math.round(color.coords[1]*255), + // Math.round(color.coords[2]*255) + // ); + // return rgb; + + // } + + rgb() { + let color = this.srgb(); + + let rgb = { + "r": Math.round(color.coords[0]*255), + "g": Math.round(color.coords[1]*255), + "b": Math.round(color.coords[2]*255) + } + return rgb; + + } + + // cmyk() { + // let color_srgb = this.srgb; + // let cmyk = rgb2cmyk( + // color_srgb[0], + // color_srgb[1], + // color_srgb[2], + // false + // ); + // let color = this.model.to("srgb-linear"); + // return color.coords; + // } + + + // // Color Strings + // // -------------------------------------------------------- + // let color_css = color_object + + // let color_string_rgb = color_srgb.toString({precision: 3, format: "rgb"}); + // let color_string_rgba = color_srgb.toString({precision: 3, format: "rgba"}); + // let color_string_hex = color_srgb.toString({precision: 3, format: "hex"}); + // let color_string_color = color_srgb.toString({precision: 3, format: "color"}); + + + toString(): string { + const [r, g, b] = this.getRGB(); + return `rgb(${r}, ${g}, ${b})`; + } + + toDict(): Record { + return { + name: this.name, + hcl_h: this.h, + hcl_c: this.c, + hcl_l: this.l, + }; + } + + // Static methods for creating Color from other formats can be added here +} diff --git a/dist/ts/color/index.ts b/dist/ts/color/index.ts new file mode 100644 index 0000000..d3c47a2 --- /dev/null +++ b/dist/ts/color/index.ts @@ -0,0 +1,18 @@ +// Copyright 2024 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +export { ColorScheme } from './ColorScheme'; +export { ColorSwatch } from './ColorSwatch'; +export { ColorPicker } from './ColorPicker'; diff --git a/dist/ts/hue.gl.d.ts b/dist/ts/config/hue.config.ts similarity index 74% rename from dist/ts/hue.gl.d.ts rename to dist/ts/config/hue.config.ts index 86e0f21..2e48850 100644 --- a/dist/ts/hue.gl.d.ts +++ b/dist/ts/config/hue.config.ts @@ -1,3 +1,5 @@ +// hue/config/hue.config.ts + // Copyright 2023 Scape Agency BV // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,13 +14,22 @@ // See the License for the specific language governing permissions and // limitations under the License. + // ============================================================================ -// -// hue.gl -// 0.0.10 -// +// Constants // ============================================================================ +export const hueConfig = { + + prefix: "N", + h_step: 15, + p_count: 9, + l_l_min: 96, + l_l_step: -6, + d_l_step: -6, + l_c_min: 12, + l_c_step: 6, + d_c_step: -6, + +}; -// General -// ============================================================================ diff --git a/dist/ts/config/hue.names.ts b/dist/ts/config/hue.names.ts new file mode 100644 index 0000000..85a334b --- /dev/null +++ b/dist/ts/config/hue.names.ts @@ -0,0 +1,48 @@ +// hue/config/hue.names.ts + +// Copyright 2023 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +// ============================================================================ +// Constants +// ============================================================================ + +export const hueNames = { + 0: "Grey", + 15: "Salmon", + 30: "Orange", + 45: "Amber", + 60: "Yellow", // Fixed + 75: "Lime", + 90: "Ecru", + 105: "Olive", + 120: "Green", // Fixed + 135: "Forest", + 150: "Jade", + 165: "Mint", + 180: "Cyan", // Fixed + 195: "Teal", + 210: "Capri", + 225: "Sky", + 240: "Blue", // Fixed + 255: "Azure", + 270: "Indigo", + 285: "Violet", + 300: "Magenta", // Fixed + 315: "Purple", + 330: "Rose", + 345: "Pink", + 360: "Red", // Fixed +}; diff --git a/dist/ts/config/index.ts b/dist/ts/config/index.ts new file mode 100644 index 0000000..d94765a --- /dev/null +++ b/dist/ts/config/index.ts @@ -0,0 +1,18 @@ +// Copyright 2024 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +export { hueConfig } from './hue.config'; +export { hueNames } from './hue.names'; + diff --git a/dist/ts/constants/hue_hcl.ts b/dist/ts/constants/hue_hcl.ts new file mode 100644 index 0000000..28d7909 --- /dev/null +++ b/dist/ts/constants/hue_hcl.ts @@ -0,0 +1,356 @@ +// Copyright 2023 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ============================================================================ +// +// hue.gl +// 0.0.11 +// +// ============================================================================ + + +// General +// ============================================================================ + +export enum hue_hcl { + + // Grey + // ------------------------------------------------------------------------ + + N0001 = "hcl(0, 0, 90)", + N0002 = "hcl(0, 0, 82)", + N0003 = "hcl(0, 0, 74)", + N0004 = "hcl(0, 0, 66)", + N0005 = "hcl(0, 0, 58)", + N0006 = "hcl(0, 0, 50)", + N0007 = "hcl(0, 0, 42)", + N0008 = "hcl(0, 0, 34)", + N0009 = "hcl(0, 0, 26)", + + // Salmon + // ------------------------------------------------------------------------ + + N0151 = "hcl(15, 12, 90)", + N0152 = "hcl(15, 18, 82)", + N0153 = "hcl(15, 24, 74)", + N0154 = "hcl(15, 30, 66)", + N0155 = "hcl(15, 36, 58)", + N0156 = "hcl(15, 30, 50)", + N0157 = "hcl(15, 24, 42)", + N0158 = "hcl(15, 18, 34)", + N0159 = "hcl(15, 12, 26)", + + // Orange + // ------------------------------------------------------------------------ + + N0301 = "hcl(30, 12, 90)", + N0302 = "hcl(30, 18, 82)", + N0303 = "hcl(30, 24, 74)", + N0304 = "hcl(30, 30, 66)", + N0305 = "hcl(30, 36, 58)", + N0306 = "hcl(30, 30, 50)", + N0307 = "hcl(30, 24, 42)", + N0308 = "hcl(30, 18, 34)", + N0309 = "hcl(30, 12, 26)", + + // Amber + // ------------------------------------------------------------------------ + + N0451 = "hcl(45, 12, 90)", + N0452 = "hcl(45, 18, 82)", + N0453 = "hcl(45, 24, 74)", + N0454 = "hcl(45, 30, 66)", + N0455 = "hcl(45, 36, 58)", + N0456 = "hcl(45, 30, 50)", + N0457 = "hcl(45, 24, 42)", + N0458 = "hcl(45, 18, 34)", + N0459 = "hcl(45, 12, 26)", + + // Yellow + // ------------------------------------------------------------------------ + + N0601 = "hcl(60, 12, 90)", + N0602 = "hcl(60, 18, 82)", + N0603 = "hcl(60, 24, 74)", + N0604 = "hcl(60, 30, 66)", + N0605 = "hcl(60, 36, 58)", + N0606 = "hcl(60, 30, 50)", + N0607 = "hcl(60, 24, 42)", + N0608 = "hcl(60, 18, 34)", + N0609 = "hcl(60, 12, 26)", + + // Lime + // ------------------------------------------------------------------------ + + N0751 = "hcl(75, 12, 90)", + N0752 = "hcl(75, 18, 82)", + N0753 = "hcl(75, 24, 74)", + N0754 = "hcl(75, 30, 66)", + N0755 = "hcl(75, 36, 58)", + N0756 = "hcl(75, 30, 50)", + N0757 = "hcl(75, 24, 42)", + N0758 = "hcl(75, 18, 34)", + N0759 = "hcl(75, 12, 26)", + + // Ecru + // ------------------------------------------------------------------------ + + N0901 = "hcl(90, 12, 90)", + N0902 = "hcl(90, 18, 82)", + N0903 = "hcl(90, 24, 74)", + N0904 = "hcl(90, 30, 66)", + N0905 = "hcl(90, 36, 58)", + N0906 = "hcl(90, 30, 50)", + N0907 = "hcl(90, 24, 42)", + N0908 = "hcl(90, 18, 34)", + N0909 = "hcl(90, 12, 26)", + + // Olive + // ------------------------------------------------------------------------ + + N1051 = "hcl(105, 12, 90)", + N1052 = "hcl(105, 18, 82)", + N1053 = "hcl(105, 24, 74)", + N1054 = "hcl(105, 30, 66)", + N1055 = "hcl(105, 36, 58)", + N1056 = "hcl(105, 30, 50)", + N1057 = "hcl(105, 24, 42)", + N1058 = "hcl(105, 18, 34)", + N1059 = "hcl(105, 12, 26)", + + // Green + // ------------------------------------------------------------------------ + + N1201 = "hcl(120, 12, 90)", + N1202 = "hcl(120, 18, 82)", + N1203 = "hcl(120, 24, 74)", + N1204 = "hcl(120, 30, 66)", + N1205 = "hcl(120, 36, 58)", + N1206 = "hcl(120, 30, 50)", + N1207 = "hcl(120, 24, 42)", + N1208 = "hcl(120, 18, 34)", + N1209 = "hcl(120, 12, 26)", + + // Forest + // ------------------------------------------------------------------------ + + N1351 = "hcl(135, 12, 90)", + N1352 = "hcl(135, 18, 82)", + N1353 = "hcl(135, 24, 74)", + N1354 = "hcl(135, 30, 66)", + N1355 = "hcl(135, 36, 58)", + N1356 = "hcl(135, 30, 50)", + N1357 = "hcl(135, 24, 42)", + N1358 = "hcl(135, 18, 34)", + N1359 = "hcl(135, 12, 26)", + + // Jade + // ------------------------------------------------------------------------ + + N1501 = "hcl(150, 12, 90)", + N1502 = "hcl(150, 18, 82)", + N1503 = "hcl(150, 24, 74)", + N1504 = "hcl(150, 30, 66)", + N1505 = "hcl(150, 36, 58)", + N1506 = "hcl(150, 30, 50)", + N1507 = "hcl(150, 24, 42)", + N1508 = "hcl(150, 18, 34)", + N1509 = "hcl(150, 12, 26)", + + // Mint + // ------------------------------------------------------------------------ + + N1651 = "hcl(165, 12, 90)", + N1652 = "hcl(165, 18, 82)", + N1653 = "hcl(165, 24, 74)", + N1654 = "hcl(165, 30, 66)", + N1655 = "hcl(165, 36, 58)", + N1656 = "hcl(165, 30, 50)", + N1657 = "hcl(165, 24, 42)", + N1658 = "hcl(165, 18, 34)", + N1659 = "hcl(165, 12, 26)", + + // Cyan + // ------------------------------------------------------------------------ + + N1801 = "hcl(180, 12, 90)", + N1802 = "hcl(180, 18, 82)", + N1803 = "hcl(180, 24, 74)", + N1804 = "hcl(180, 30, 66)", + N1805 = "hcl(180, 36, 58)", + N1806 = "hcl(180, 30, 50)", + N1807 = "hcl(180, 24, 42)", + N1808 = "hcl(180, 18, 34)", + N1809 = "hcl(180, 12, 26)", + + // Teal + // ------------------------------------------------------------------------ + + N1951 = "hcl(195, 12, 90)", + N1952 = "hcl(195, 18, 82)", + N1953 = "hcl(195, 24, 74)", + N1954 = "hcl(195, 30, 66)", + N1955 = "hcl(195, 36, 58)", + N1956 = "hcl(195, 30, 50)", + N1957 = "hcl(195, 24, 42)", + N1958 = "hcl(195, 18, 34)", + N1959 = "hcl(195, 12, 26)", + + // Capri + // ------------------------------------------------------------------------ + + N2101 = "hcl(210, 12, 90)", + N2102 = "hcl(210, 18, 82)", + N2103 = "hcl(210, 24, 74)", + N2104 = "hcl(210, 30, 66)", + N2105 = "hcl(210, 36, 58)", + N2106 = "hcl(210, 30, 50)", + N2107 = "hcl(210, 24, 42)", + N2108 = "hcl(210, 18, 34)", + N2109 = "hcl(210, 12, 26)", + + // Sky + // ------------------------------------------------------------------------ + + N2251 = "hcl(225, 12, 90)", + N2252 = "hcl(225, 18, 82)", + N2253 = "hcl(225, 24, 74)", + N2254 = "hcl(225, 30, 66)", + N2255 = "hcl(225, 36, 58)", + N2256 = "hcl(225, 30, 50)", + N2257 = "hcl(225, 24, 42)", + N2258 = "hcl(225, 18, 34)", + N2259 = "hcl(225, 12, 26)", + + // Blue + // ------------------------------------------------------------------------ + + N2401 = "hcl(240, 12, 90)", + N2402 = "hcl(240, 18, 82)", + N2403 = "hcl(240, 24, 74)", + N2404 = "hcl(240, 30, 66)", + N2405 = "hcl(240, 36, 58)", + N2406 = "hcl(240, 30, 50)", + N2407 = "hcl(240, 24, 42)", + N2408 = "hcl(240, 18, 34)", + N2409 = "hcl(240, 12, 26)", + + // Azure + // ------------------------------------------------------------------------ + + N2551 = "hcl(255, 12, 90)", + N2552 = "hcl(255, 18, 82)", + N2553 = "hcl(255, 24, 74)", + N2554 = "hcl(255, 30, 66)", + N2555 = "hcl(255, 36, 58)", + N2556 = "hcl(255, 30, 50)", + N2557 = "hcl(255, 24, 42)", + N2558 = "hcl(255, 18, 34)", + N2559 = "hcl(255, 12, 26)", + + // Indigo + // ------------------------------------------------------------------------ + + N2701 = "hcl(270, 12, 90)", + N2702 = "hcl(270, 18, 82)", + N2703 = "hcl(270, 24, 74)", + N2704 = "hcl(270, 30, 66)", + N2705 = "hcl(270, 36, 58)", + N2706 = "hcl(270, 30, 50)", + N2707 = "hcl(270, 24, 42)", + N2708 = "hcl(270, 18, 34)", + N2709 = "hcl(270, 12, 26)", + + // Violet + // ------------------------------------------------------------------------ + + N2851 = "hcl(285, 12, 90)", + N2852 = "hcl(285, 18, 82)", + N2853 = "hcl(285, 24, 74)", + N2854 = "hcl(285, 30, 66)", + N2855 = "hcl(285, 36, 58)", + N2856 = "hcl(285, 30, 50)", + N2857 = "hcl(285, 24, 42)", + N2858 = "hcl(285, 18, 34)", + N2859 = "hcl(285, 12, 26)", + + // Magenta + // ------------------------------------------------------------------------ + + N3001 = "hcl(300, 12, 90)", + N3002 = "hcl(300, 18, 82)", + N3003 = "hcl(300, 24, 74)", + N3004 = "hcl(300, 30, 66)", + N3005 = "hcl(300, 36, 58)", + N3006 = "hcl(300, 30, 50)", + N3007 = "hcl(300, 24, 42)", + N3008 = "hcl(300, 18, 34)", + N3009 = "hcl(300, 12, 26)", + + // Purple + // ------------------------------------------------------------------------ + + N3151 = "hcl(315, 12, 90)", + N3152 = "hcl(315, 18, 82)", + N3153 = "hcl(315, 24, 74)", + N3154 = "hcl(315, 30, 66)", + N3155 = "hcl(315, 36, 58)", + N3156 = "hcl(315, 30, 50)", + N3157 = "hcl(315, 24, 42)", + N3158 = "hcl(315, 18, 34)", + N3159 = "hcl(315, 12, 26)", + + // Rose + // ------------------------------------------------------------------------ + + N3301 = "hcl(330, 12, 90)", + N3302 = "hcl(330, 18, 82)", + N3303 = "hcl(330, 24, 74)", + N3304 = "hcl(330, 30, 66)", + N3305 = "hcl(330, 36, 58)", + N3306 = "hcl(330, 30, 50)", + N3307 = "hcl(330, 24, 42)", + N3308 = "hcl(330, 18, 34)", + N3309 = "hcl(330, 12, 26)", + + // Pink + // ------------------------------------------------------------------------ + + N3451 = "hcl(345, 12, 90)", + N3452 = "hcl(345, 18, 82)", + N3453 = "hcl(345, 24, 74)", + N3454 = "hcl(345, 30, 66)", + N3455 = "hcl(345, 36, 58)", + N3456 = "hcl(345, 30, 50)", + N3457 = "hcl(345, 24, 42)", + N3458 = "hcl(345, 18, 34)", + N3459 = "hcl(345, 12, 26)", + + // Red + // ------------------------------------------------------------------------ + + N3601 = "hcl(360, 12, 90)", + N3602 = "hcl(360, 18, 82)", + N3603 = "hcl(360, 24, 74)", + N3604 = "hcl(360, 30, 66)", + N3605 = "hcl(360, 36, 58)", + N3606 = "hcl(360, 30, 50)", + N3607 = "hcl(360, 24, 42)", + N3608 = "hcl(360, 18, 34)", + N3609 = "hcl(360, 12, 26)", + + +} + + diff --git a/dist/ts/constants/hue_hex.ts b/dist/ts/constants/hue_hex.ts new file mode 100644 index 0000000..ef10c59 --- /dev/null +++ b/dist/ts/constants/hue_hex.ts @@ -0,0 +1,356 @@ +// Copyright 2023 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ============================================================================ +// +// hue.gl +// 0.0.11 +// +// ============================================================================ + + +// General +// ============================================================================ + +export enum hue_hex { + + // Grey + // ------------------------------------------------------------------------ + + N0001 = '#e2e2e2', + N0002 = '#cccccc', + N0003 = '#b6b6b6', + N0004 = '#a0a0a0', + N0005 = '#8b8b8b', + N0006 = '#777777', + N0007 = '#636363', + N0008 = '#505050', + N0009 = '#3e3e3e', + + // Salmon + // ------------------------------------------------------------------------ + + N0151 = '#fadbdd', + N0152 = '#eec0c4', + N0153 = '#e2a6ac', + N0154 = '#d48c94', + N0155 = '#c6727d', + N0156 = '#a7636b', + N0157 = '#89545a', + N0158 = '#6b4549', + N0159 = '#4f3739', + + // Orange + // ------------------------------------------------------------------------ + + N0301 = '#fadbd7', + N0302 = '#edc1bc', + N0303 = '#e0a8a1', + N0304 = '#d28e87', + N0305 = '#c4756e', + N0306 = '#a5655f', + N0307 = '#875650', + N0308 = '#6b4642', + N0309 = '#4f3835', + + // Amber + // ------------------------------------------------------------------------ + + N0451 = '#f8dcd3', + N0452 = '#eac3b5', + N0453 = '#dcaa98', + N0454 = '#cd927c', + N0455 = '#be7960', + N0456 = '#a06954', + N0457 = '#845848', + N0458 = '#68483c', + N0459 = '#4d3931', + + // Yellow + // ------------------------------------------------------------------------ + + N0601 = '#f4decf', + N0602 = '#e5c6af', + N0603 = '#d5ad90', + N0604 = '#c59672', + N0605 = '#b57f55', + N0606 = '#996d4b', + N0607 = '#7e5b41', + N0608 = '#644a38', + N0609 = '#4a3a2e', + + // Lime + // ------------------------------------------------------------------------ + + N0751 = '#efe0cc', + N0752 = '#dec8ac', + N0753 = '#cdb18c', + N0754 = '#bb9b6c', + N0755 = '#a9854e', + N0756 = '#8f7145', + N0757 = '#765f3d', + N0758 = '#5e4d34', + N0759 = '#473c2c', + + // Ecru + // ------------------------------------------------------------------------ + + N0901 = '#eae2cb', + N0902 = '#d6cbaa', + N0903 = '#c2b58a', + N0904 = '#af9f6a', + N0905 = '#9b8a4b', + N0906 = '#847643', + N0907 = '#6d623b', + N0908 = '#584f33', + N0909 = '#433d2b', + + // Olive + // ------------------------------------------------------------------------ + + N1051 = '#e3e4cc', + N1052 = '#cdceab', + N1053 = '#b7b98b', + N1054 = '#a1a46b', + N1055 = '#8b8f4c', + N1056 = '#777a44', + N1057 = '#63663c', + N1058 = '#505234', + N1059 = '#3e3f2c', + + // Green + // ------------------------------------------------------------------------ + + N1201 = '#dde6ce', + N1202 = '#c4d1ae', + N1203 = '#abbc8f', + N1204 = '#92a870', + N1205 = '#7a9453', + N1206 = '#697e49', + N1207 = '#586840', + N1208 = '#485437', + N1209 = '#39402d', + + // Forest + // ------------------------------------------------------------------------ + + N1351 = '#d7e7d2', + N1352 = '#bbd3b3', + N1353 = '#9fbf96', + N1354 = '#83ab79', + N1355 = '#68975d', + N1356 = '#5a8151', + N1357 = '#4d6b46', + N1358 = '#40553b', + N1359 = '#344130', + + // Jade + // ------------------------------------------------------------------------ + + N1501 = '#d1e8d6', + N1502 = '#b2d4ba', + N1503 = '#93c19f', + N1504 = '#74ad84', + N1505 = '#559a6a', + N1506 = '#4b835c', + N1507 = '#426c4e', + N1508 = '#395741', + N1509 = '#2f4234', + + // Mint + // ------------------------------------------------------------------------ + + N1651 = '#cde9dc', + N1652 = '#abd6c2', + N1653 = '#89c2a9', + N1654 = '#66af91', + N1655 = '#409b7a', + N1656 = '#3c8469', + N1657 = '#376d58', + N1658 = '#315848', + N1659 = '#2b4338', + + // Cyan + // ------------------------------------------------------------------------ + + N1801 = '#c9e9e2', + N1802 = '#a6d6cb', + N1803 = '#81c3b5', + N1804 = '#5baf9f', + N1805 = '#2a9c8a', + N1806 = '#2d8576', + N1807 = '#2d6e62', + N1808 = '#2b584f', + N1809 = '#28433d', + + // Teal + // ------------------------------------------------------------------------ + + N1951 = '#c8e9e8', + N1952 = '#a3d6d4', + N1953 = '#7dc3c0', + N1954 = '#53afad', + N1955 = '#109c9a', + N1956 = '#208583', + N1957 = '#266e6d', + N1958 = '#275857', + N1959 = '#264342', + + // Capri + // ------------------------------------------------------------------------ + + N2101 = '#c8e9ed', + N2102 = '#a3d5dc', + N2103 = '#7dc2cb', + N2104 = '#52aeba', + N2105 = '#019baa', + N2106 = '#1c8490', + N2107 = '#246d76', + N2108 = '#27575e', + N2109 = '#264246', + + // Sky + // ------------------------------------------------------------------------ + + N2251 = '#cae8f2', + N2252 = '#a6d4e3', + N2253 = '#81c0d4', + N2254 = '#58acc6', + N2255 = '#1a99b7', + N2256 = '#25829a', + N2257 = '#2a6c7e', + N2258 = '#2a5664', + N2259 = '#27424a', + + // Blue + // ------------------------------------------------------------------------ + + N2401 = '#cee6f6', + N2402 = '#acd2e9', + N2403 = '#8abedc', + N2404 = '#65aace', + N2405 = '#3696c1', + N2406 = '#3680a3', + N2407 = '#346a85', + N2408 = '#305568', + N2409 = '#2b414d', + + // Azure + // ------------------------------------------------------------------------ + + N2551 = '#d3e5f8', + N2552 = '#b5cfec', + N2553 = '#95bbe0', + N2554 = '#75a6d4', + N2555 = '#5192c8', + N2556 = '#497ca8', + N2557 = '#416789', + N2558 = '#39536b', + N2559 = '#303f4f', + + // Indigo + // ------------------------------------------------------------------------ + + N2701 = '#dae3f9', + N2702 = '#becdee', + N2703 = '#a3b7e2', + N2704 = '#87a2d6', + N2705 = '#6a8dca', + N2706 = '#5d78aa', + N2707 = '#4f648b', + N2708 = '#42516c', + N2709 = '#353e50', + + // Violet + // ------------------------------------------------------------------------ + + N2851 = '#e0e1f9', + N2852 = '#c8caed', + N2853 = '#b1b3e1', + N2854 = '#999dd5', + N2855 = '#8188c8', + N2856 = '#6f74a8', + N2857 = '#5d6189', + N2858 = '#4c4e6c', + N2859 = '#3b3c4f', + + // Magenta + // ------------------------------------------------------------------------ + + N3001 = '#e7dff6', + N3002 = '#d3c7e9', + N3003 = '#beafdc', + N3004 = '#aa98cf', + N3005 = '#9582c2', + N3006 = '#7f6fa3', + N3007 = '#6a5d86', + N3008 = '#554c69', + N3009 = '#413b4d', + + // Purple + // ------------------------------------------------------------------------ + + N3151 = '#edddf3', + N3152 = '#dcc4e4', + N3153 = '#caacd6', + N3154 = '#b994c7', + N3155 = '#a77cb9', + N3156 = '#8d6b9c', + N3157 = '#755a7f', + N3158 = '#5d4964', + N3159 = '#46394b', + + // Rose + // ------------------------------------------------------------------------ + + N3301 = '#f3dcee', + N3302 = '#e3c2dd', + N3303 = '#d4a9cd', + N3304 = '#c590bc', + N3305 = '#b577ac', + N3306 = '#996791', + N3307 = '#7d5777', + N3308 = '#63475f', + N3309 = '#4a3847', + + // Pink + // ------------------------------------------------------------------------ + + N3451 = '#f7dbe9', + N3452 = '#e9c1d5', + N3453 = '#dba7c2', + N3454 = '#cd8daf', + N3455 = '#bf739d', + N3456 = '#a16485', + N3457 = '#84546e', + N3458 = '#684658', + N3459 = '#4d3743', + + // Red + // ------------------------------------------------------------------------ + + N3601 = '#f9dbe3', + N3602 = '#edc0cd', + N3603 = '#e0a6b7', + N3604 = '#d38ca2', + N3605 = '#c5728d', + N3606 = '#a66278', + N3607 = '#885464', + N3608 = '#6b4551', + N3609 = '#4f373e', + + +} + + diff --git a/dist/ts/constants/hue_rgb.ts b/dist/ts/constants/hue_rgb.ts new file mode 100644 index 0000000..e056d12 --- /dev/null +++ b/dist/ts/constants/hue_rgb.ts @@ -0,0 +1,356 @@ +// Copyright 2023 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ============================================================================ +// +// hue.gl +// 0.0.11 +// +// ============================================================================ + + +// General +// ============================================================================ + +export enum hue_rgb { + + // Grey + // ------------------------------------------------------------------------ + + N0001 = "rgb(226, 226, 226)", + N0002 = "rgb(204, 204, 204)", + N0003 = "rgb(182, 182, 182)", + N0004 = "rgb(160, 160, 160)", + N0005 = "rgb(139, 139, 139)", + N0006 = "rgb(119, 119, 119)", + N0007 = "rgb(99, 99, 99)", + N0008 = "rgb(80, 80, 80)", + N0009 = "rgb(62, 62, 62)", + + // Salmon + // ------------------------------------------------------------------------ + + N0151 = "rgb(250, 219, 221)", + N0152 = "rgb(238, 192, 196)", + N0153 = "rgb(226, 166, 172)", + N0154 = "rgb(212, 140, 148)", + N0155 = "rgb(198, 114, 125)", + N0156 = "rgb(167, 99, 107)", + N0157 = "rgb(137, 84, 90)", + N0158 = "rgb(107, 69, 73)", + N0159 = "rgb(79, 55, 57)", + + // Orange + // ------------------------------------------------------------------------ + + N0301 = "rgb(250, 219, 215)", + N0302 = "rgb(237, 193, 188)", + N0303 = "rgb(224, 168, 161)", + N0304 = "rgb(210, 142, 135)", + N0305 = "rgb(196, 117, 110)", + N0306 = "rgb(165, 101, 95)", + N0307 = "rgb(135, 86, 80)", + N0308 = "rgb(107, 70, 66)", + N0309 = "rgb(79, 56, 53)", + + // Amber + // ------------------------------------------------------------------------ + + N0451 = "rgb(248, 220, 211)", + N0452 = "rgb(234, 195, 181)", + N0453 = "rgb(220, 170, 152)", + N0454 = "rgb(205, 146, 124)", + N0455 = "rgb(190, 121, 96)", + N0456 = "rgb(160, 105, 84)", + N0457 = "rgb(132, 88, 72)", + N0458 = "rgb(104, 72, 60)", + N0459 = "rgb(77, 57, 49)", + + // Yellow + // ------------------------------------------------------------------------ + + N0601 = "rgb(244, 222, 207)", + N0602 = "rgb(229, 198, 175)", + N0603 = "rgb(213, 173, 144)", + N0604 = "rgb(197, 150, 114)", + N0605 = "rgb(181, 127, 85)", + N0606 = "rgb(153, 109, 75)", + N0607 = "rgb(126, 91, 65)", + N0608 = "rgb(100, 74, 56)", + N0609 = "rgb(74, 58, 46)", + + // Lime + // ------------------------------------------------------------------------ + + N0751 = "rgb(239, 224, 204)", + N0752 = "rgb(222, 200, 172)", + N0753 = "rgb(205, 177, 140)", + N0754 = "rgb(187, 155, 108)", + N0755 = "rgb(169, 133, 78)", + N0756 = "rgb(143, 113, 69)", + N0757 = "rgb(118, 95, 61)", + N0758 = "rgb(94, 77, 52)", + N0759 = "rgb(71, 60, 44)", + + // Ecru + // ------------------------------------------------------------------------ + + N0901 = "rgb(234, 226, 203)", + N0902 = "rgb(214, 203, 170)", + N0903 = "rgb(194, 181, 138)", + N0904 = "rgb(175, 159, 106)", + N0905 = "rgb(155, 138, 75)", + N0906 = "rgb(132, 118, 67)", + N0907 = "rgb(109, 98, 59)", + N0908 = "rgb(88, 79, 51)", + N0909 = "rgb(67, 61, 43)", + + // Olive + // ------------------------------------------------------------------------ + + N1051 = "rgb(227, 228, 204)", + N1052 = "rgb(205, 206, 171)", + N1053 = "rgb(183, 185, 139)", + N1054 = "rgb(161, 164, 107)", + N1055 = "rgb(139, 143, 76)", + N1056 = "rgb(119, 122, 68)", + N1057 = "rgb(99, 102, 60)", + N1058 = "rgb(80, 82, 52)", + N1059 = "rgb(62, 63, 44)", + + // Green + // ------------------------------------------------------------------------ + + N1201 = "rgb(221, 230, 206)", + N1202 = "rgb(196, 209, 174)", + N1203 = "rgb(171, 188, 143)", + N1204 = "rgb(146, 168, 112)", + N1205 = "rgb(122, 148, 83)", + N1206 = "rgb(105, 126, 73)", + N1207 = "rgb(88, 104, 64)", + N1208 = "rgb(72, 84, 55)", + N1209 = "rgb(57, 64, 45)", + + // Forest + // ------------------------------------------------------------------------ + + N1351 = "rgb(215, 231, 210)", + N1352 = "rgb(187, 211, 179)", + N1353 = "rgb(159, 191, 150)", + N1354 = "rgb(131, 171, 121)", + N1355 = "rgb(104, 151, 93)", + N1356 = "rgb(90, 129, 81)", + N1357 = "rgb(77, 107, 70)", + N1358 = "rgb(64, 85, 59)", + N1359 = "rgb(52, 65, 48)", + + // Jade + // ------------------------------------------------------------------------ + + N1501 = "rgb(209, 232, 214)", + N1502 = "rgb(178, 212, 186)", + N1503 = "rgb(147, 193, 159)", + N1504 = "rgb(116, 173, 132)", + N1505 = "rgb(85, 154, 106)", + N1506 = "rgb(75, 131, 92)", + N1507 = "rgb(66, 108, 78)", + N1508 = "rgb(57, 87, 65)", + N1509 = "rgb(47, 66, 52)", + + // Mint + // ------------------------------------------------------------------------ + + N1651 = "rgb(205, 233, 220)", + N1652 = "rgb(171, 214, 194)", + N1653 = "rgb(137, 194, 169)", + N1654 = "rgb(102, 175, 145)", + N1655 = "rgb(64, 155, 122)", + N1656 = "rgb(60, 132, 105)", + N1657 = "rgb(55, 109, 88)", + N1658 = "rgb(49, 88, 72)", + N1659 = "rgb(43, 67, 56)", + + // Cyan + // ------------------------------------------------------------------------ + + N1801 = "rgb(201, 233, 226)", + N1802 = "rgb(166, 214, 203)", + N1803 = "rgb(129, 195, 181)", + N1804 = "rgb(91, 175, 159)", + N1805 = "rgb(42, 156, 138)", + N1806 = "rgb(45, 133, 118)", + N1807 = "rgb(45, 110, 98)", + N1808 = "rgb(43, 88, 79)", + N1809 = "rgb(40, 67, 61)", + + // Teal + // ------------------------------------------------------------------------ + + N1951 = "rgb(200, 233, 232)", + N1952 = "rgb(163, 214, 212)", + N1953 = "rgb(125, 195, 192)", + N1954 = "rgb(83, 175, 173)", + N1955 = "rgb(16, 156, 154)", + N1956 = "rgb(32, 133, 131)", + N1957 = "rgb(38, 110, 109)", + N1958 = "rgb(39, 88, 87)", + N1959 = "rgb(38, 67, 66)", + + // Capri + // ------------------------------------------------------------------------ + + N2101 = "rgb(200, 233, 237)", + N2102 = "rgb(163, 213, 220)", + N2103 = "rgb(125, 194, 203)", + N2104 = "rgb(82, 174, 186)", + N2105 = "rgb(1, 155, 170)", + N2106 = "rgb(28, 132, 144)", + N2107 = "rgb(36, 109, 118)", + N2108 = "rgb(39, 87, 94)", + N2109 = "rgb(38, 66, 70)", + + // Sky + // ------------------------------------------------------------------------ + + N2251 = "rgb(202, 232, 242)", + N2252 = "rgb(166, 212, 227)", + N2253 = "rgb(129, 192, 212)", + N2254 = "rgb(88, 172, 198)", + N2255 = "rgb(26, 153, 183)", + N2256 = "rgb(37, 130, 154)", + N2257 = "rgb(42, 108, 126)", + N2258 = "rgb(42, 86, 100)", + N2259 = "rgb(39, 66, 74)", + + // Blue + // ------------------------------------------------------------------------ + + N2401 = "rgb(206, 230, 246)", + N2402 = "rgb(172, 210, 233)", + N2403 = "rgb(138, 190, 220)", + N2404 = "rgb(101, 170, 206)", + N2405 = "rgb(54, 150, 193)", + N2406 = "rgb(54, 128, 163)", + N2407 = "rgb(52, 106, 133)", + N2408 = "rgb(48, 85, 104)", + N2409 = "rgb(43, 65, 77)", + + // Azure + // ------------------------------------------------------------------------ + + N2551 = "rgb(211, 229, 248)", + N2552 = "rgb(181, 207, 236)", + N2553 = "rgb(149, 187, 224)", + N2554 = "rgb(117, 166, 212)", + N2555 = "rgb(81, 146, 200)", + N2556 = "rgb(73, 124, 168)", + N2557 = "rgb(65, 103, 137)", + N2558 = "rgb(57, 83, 107)", + N2559 = "rgb(48, 63, 79)", + + // Indigo + // ------------------------------------------------------------------------ + + N2701 = "rgb(218, 227, 249)", + N2702 = "rgb(190, 205, 238)", + N2703 = "rgb(163, 183, 226)", + N2704 = "rgb(135, 162, 214)", + N2705 = "rgb(106, 141, 202)", + N2706 = "rgb(93, 120, 170)", + N2707 = "rgb(79, 100, 139)", + N2708 = "rgb(66, 81, 108)", + N2709 = "rgb(53, 62, 80)", + + // Violet + // ------------------------------------------------------------------------ + + N2851 = "rgb(224, 225, 249)", + N2852 = "rgb(200, 202, 237)", + N2853 = "rgb(177, 179, 225)", + N2854 = "rgb(153, 157, 213)", + N2855 = "rgb(129, 136, 200)", + N2856 = "rgb(111, 116, 168)", + N2857 = "rgb(93, 97, 137)", + N2858 = "rgb(76, 78, 108)", + N2859 = "rgb(59, 60, 79)", + + // Magenta + // ------------------------------------------------------------------------ + + N3001 = "rgb(231, 223, 246)", + N3002 = "rgb(211, 199, 233)", + N3003 = "rgb(190, 175, 220)", + N3004 = "rgb(170, 152, 207)", + N3005 = "rgb(149, 130, 194)", + N3006 = "rgb(127, 111, 163)", + N3007 = "rgb(106, 93, 134)", + N3008 = "rgb(85, 76, 105)", + N3009 = "rgb(65, 59, 77)", + + // Purple + // ------------------------------------------------------------------------ + + N3151 = "rgb(237, 221, 243)", + N3152 = "rgb(220, 196, 228)", + N3153 = "rgb(202, 172, 214)", + N3154 = "rgb(185, 148, 199)", + N3155 = "rgb(167, 124, 185)", + N3156 = "rgb(141, 107, 156)", + N3157 = "rgb(117, 90, 127)", + N3158 = "rgb(93, 73, 100)", + N3159 = "rgb(70, 57, 75)", + + // Rose + // ------------------------------------------------------------------------ + + N3301 = "rgb(243, 220, 238)", + N3302 = "rgb(227, 194, 221)", + N3303 = "rgb(212, 169, 205)", + N3304 = "rgb(197, 144, 188)", + N3305 = "rgb(181, 119, 172)", + N3306 = "rgb(153, 103, 145)", + N3307 = "rgb(125, 87, 119)", + N3308 = "rgb(99, 71, 95)", + N3309 = "rgb(74, 56, 71)", + + // Pink + // ------------------------------------------------------------------------ + + N3451 = "rgb(247, 219, 233)", + N3452 = "rgb(233, 193, 213)", + N3453 = "rgb(219, 167, 194)", + N3454 = "rgb(205, 141, 175)", + N3455 = "rgb(191, 115, 157)", + N3456 = "rgb(161, 100, 133)", + N3457 = "rgb(132, 84, 110)", + N3458 = "rgb(104, 70, 88)", + N3459 = "rgb(77, 55, 67)", + + // Red + // ------------------------------------------------------------------------ + + N3601 = "rgb(249, 219, 227)", + N3602 = "rgb(237, 192, 205)", + N3603 = "rgb(224, 166, 183)", + N3604 = "rgb(211, 140, 162)", + N3605 = "rgb(197, 114, 141)", + N3606 = "rgb(166, 98, 120)", + N3607 = "rgb(136, 84, 100)", + N3608 = "rgb(107, 69, 81)", + N3609 = "rgb(79, 55, 62)", + + +} + + diff --git a/dist/ts/constants/index.ts b/dist/ts/constants/index.ts new file mode 100644 index 0000000..45fde92 --- /dev/null +++ b/dist/ts/constants/index.ts @@ -0,0 +1,18 @@ +// Copyright 2024 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +export { hue_hex } from './hue_hex'; +export { hue_hcl } from './hue_hcl'; +export { hue_rgb } from './hue_rgb'; diff --git a/dist/ts/index.ts b/dist/ts/index.ts index 910db53..1c66c8c 100644 --- a/dist/ts/index.ts +++ b/dist/ts/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Scape Agency BV +// Copyright 2024 Scape Agency BV // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -13,4 +13,21 @@ // limitations under the License. -export {}; \ No newline at end of file +export { + ColorPicker, + ColorScheme, + ColorSwatch, +} from './color'; + + +export { + hueConfig, + hueNames, +} from './config'; + + +export { + hue_hex, + hue_hcl, + hue_rgb, +} from './constants'; \ No newline at end of file diff --git a/dist/ts/util.ts b/dist/ts/util.ts new file mode 100644 index 0000000..4497ed6 --- /dev/null +++ b/dist/ts/util.ts @@ -0,0 +1,52 @@ + +// import Color from "https://colorjs.io/dist/color.js"; +// import Chroma from "https://cdnjs.cloudflare.com/ajax/libs/chroma-js/2.4.2/chroma.min.js"; + + + +export function rgb2cmyk(r: number, g: number, b: number, normalized: any){ + var c = 1 - (r / 255); + var m = 1 - (g / 255); + var y = 1 - (b / 255); + var k = Math.min(c, Math.min(m, y)); + + c = (c - k) / (1 - k); + m = (m - k) / (1 - k); + y = (y - k) / (1 - k); + + if(!normalized){ + c = Math.round(c * 10000) / 100; + m = Math.round(m * 10000) / 100; + y = Math.round(y * 10000) / 100; + k = Math.round(k * 10000) / 100; + } + + c = isNaN(c) ? 0 : c; + m = isNaN(m) ? 0 : m; + y = isNaN(y) ? 0 : y; + k = isNaN(k) ? 0 : k; + + return { + c: c, + m: m, + y: y, + k: k + } +} + +export function colorToHex(color: { toString: (arg0: number) => any; }) { + var hexadecimal = color.toString(16); + return hexadecimal.length == 1 ? "0" + hexadecimal : hexadecimal; +} + + +export function convertRGBtoHex(red: any, green: any, blue: any) { + return "#" + colorToHex(red) + colorToHex(green) + colorToHex(blue); +} + + +export function pad(num: string | any[], size: number, char: any) { + num = num.toString(); + while (num.length < size) num = char + num; + return num; +} diff --git a/package.json b/package.json index 83ae5e8..78b08c6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "hue.gl", "description": "hue.gl is a colour palette developed by Scape Agency.", - "version": "0.0.10", + "version": "0.0.11", "config": { "version_short": "0.0" }, diff --git a/src/jinja/hue.gl-hcl-enum.ts.jinja b/src/jinja/hue.gl-hcl-enum.ts.jinja new file mode 100644 index 0000000..f018fc7 --- /dev/null +++ b/src/jinja/hue.gl-hcl-enum.ts.jinja @@ -0,0 +1,40 @@ +// Copyright 2023 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ============================================================================ +// +// {{ name }} +// {{ version }} +// +// ============================================================================ + + +// General +// ============================================================================ + +export enum hue_hcl { + +{% for group_name, group in colors %} + // {{ group_name }} + // ------------------------------------------------------------------------ + +{% for color_name, color in group %} + {{ color_name }} = "hcl({{ color.hcl().h }}, {{ color.hcl().c }}, {{ color.hcl().l }})", +{% endfor %} + +{% endfor %} + +} + + diff --git a/src/jinja/hue.gl-hex-enum.ts.jinja b/src/jinja/hue.gl-hex-enum.ts.jinja new file mode 100644 index 0000000..96b553e --- /dev/null +++ b/src/jinja/hue.gl-hex-enum.ts.jinja @@ -0,0 +1,40 @@ +// Copyright 2023 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ============================================================================ +// +// {{ name }} +// {{ version }} +// +// ============================================================================ + + +// General +// ============================================================================ + +export enum hue_hex { + +{% for group_name, group in colors %} + // {{ group_name }} + // ------------------------------------------------------------------------ + +{% for color_name, color in group %} + {{ color_name }} = '{{ color.hex() }}', +{% endfor %} + +{% endfor %} + +} + + diff --git a/src/jinja/hue.gl-rgb-enum.ts.jinja b/src/jinja/hue.gl-rgb-enum.ts.jinja new file mode 100644 index 0000000..495c12e --- /dev/null +++ b/src/jinja/hue.gl-rgb-enum.ts.jinja @@ -0,0 +1,40 @@ +// Copyright 2023 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ============================================================================ +// +// {{ name }} +// {{ version }} +// +// ============================================================================ + + +// General +// ============================================================================ + +export enum hue_rgb { + +{% for group_name, group in colors %} + // {{ group_name }} + // ------------------------------------------------------------------------ + +{% for color_name, color in group %} + {{ color_name }} = "rgb({{ color.rgb().r }}, {{ color.rgb().g }}, {{ color.rgb().b }})", +{% endfor %} + +{% endfor %} + +} + + diff --git a/src/scss/hue/_hue.gl-hcl-map.scss b/src/scss/hue/_hue.gl-hcl-map.scss index 1b08211..aa3c120 100644 --- a/src/scss/hue/_hue.gl-hcl-map.scss +++ b/src/scss/hue/_hue.gl-hcl-map.scss @@ -15,7 +15,7 @@ // ============================================================================ // // hue.gl -// 0.0.10 +// 0.0.11 // // ============================================================================ diff --git a/src/scss/hue/_hue.gl-hcl-var.scss b/src/scss/hue/_hue.gl-hcl-var.scss index ea51a3a..69e8c48 100644 --- a/src/scss/hue/_hue.gl-hcl-var.scss +++ b/src/scss/hue/_hue.gl-hcl-var.scss @@ -15,7 +15,7 @@ // ============================================================================ // // hue.gl -// 0.0.10 +// 0.0.11 // // ============================================================================ diff --git a/src/scss/hue/_hue.gl-hex-map.scss b/src/scss/hue/_hue.gl-hex-map.scss index a354ca8..6cd95f2 100644 --- a/src/scss/hue/_hue.gl-hex-map.scss +++ b/src/scss/hue/_hue.gl-hex-map.scss @@ -15,7 +15,7 @@ // ============================================================================ // // hue.gl -// 0.0.10 +// 0.0.11 // // ============================================================================ diff --git a/src/scss/hue/_hue.gl-hex-var.scss b/src/scss/hue/_hue.gl-hex-var.scss index ea746d6..f3941af 100644 --- a/src/scss/hue/_hue.gl-hex-var.scss +++ b/src/scss/hue/_hue.gl-hex-var.scss @@ -15,7 +15,7 @@ // ============================================================================ // // hue.gl -// 0.0.10 +// 0.0.11 // // ============================================================================ diff --git a/src/scss/hue/_hue.gl-rgb-map.scss b/src/scss/hue/_hue.gl-rgb-map.scss index 6bbd906..fc61dbb 100644 --- a/src/scss/hue/_hue.gl-rgb-map.scss +++ b/src/scss/hue/_hue.gl-rgb-map.scss @@ -15,7 +15,7 @@ // ============================================================================ // // hue.gl -// 0.0.10 +// 0.0.11 // // ============================================================================ diff --git a/src/scss/hue/_hue.gl-rgb-var.scss b/src/scss/hue/_hue.gl-rgb-var.scss index ea51a3a..69e8c48 100644 --- a/src/scss/hue/_hue.gl-rgb-var.scss +++ b/src/scss/hue/_hue.gl-rgb-var.scss @@ -15,7 +15,7 @@ // ============================================================================ // // hue.gl -// 0.0.10 +// 0.0.11 // // ============================================================================ diff --git a/src/ts/color/ColorPicker.ts b/src/ts/color/ColorPicker.ts new file mode 100644 index 0000000..e1c0f0b --- /dev/null +++ b/src/ts/color/ColorPicker.ts @@ -0,0 +1,75 @@ +// script/class/class/DirectoryCleaner.ts + +// Copyright 2023 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +// ============================================================================ +// Import +// ============================================================================ + +import { + hue_hex, + hue_hcl, + hue_rgb, +} from '../constants'; + + +// ============================================================================ +// Types +// ============================================================================ + +type ColorEnum = 'RGB' | 'HSL' | 'HCL' | 'HEX'; + + +// ============================================================================ +// Classes +// ============================================================================ + +export class ColorPicker { + + /** + * Retrieves a color value by its enum key. + * @param colorEnum The enum type ('RGB' or 'HSL') to pick the color from. + * @param colorKey The key of the color in the specified enum. + * @returns The color value or null if the key does not exist in the specified enum. + */ + static get(colorEnum: ColorEnum, colorKey: string): string | null { + let color: string | undefined; + + switch (colorEnum) { + case 'RGB': + // color = hue_rgb[colorKey as keyof typeof hue_rgb]; + return hue_rgb[colorKey as keyof typeof hue_rgb] || null; + // break; + case 'HCL': + // color = hue_hcl[colorKey as keyof typeof hue_hcl]; + return hue_hcl[colorKey as keyof typeof hue_hcl] || null; + // break; + case 'HEX': + // color = hue_hex[colorKey as keyof typeof hue_hex]; + return hue_hex[colorKey as keyof typeof hue_hex] || null; + // break; + default: + return null; + } + + // return color || null; + } + +} + +// Usage examples +// const specificRGBColor = ColorPicker.getColor('RGB', 'N0001'); // Should return "rgb(0, 0, 90)" or similar +// console.log(specificRGBColor); // Outputs: rgb(0, 0, 90) or similar diff --git a/src/ts/color/ColorScheme.ts b/src/ts/color/ColorScheme.ts new file mode 100644 index 0000000..bc31963 --- /dev/null +++ b/src/ts/color/ColorScheme.ts @@ -0,0 +1,126 @@ +// script/class/class/DirectoryCleaner.ts + +// Copyright 2023 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +// ============================================================================ +// Import +// ============================================================================ + +import { ColorSwatch } from './ColorSwatch.js'; +import { pad } from '../util.js'; + + +// ============================================================================ +// Types +// ============================================================================ + +type ColorSchemeConfig = { + prefix?: string; + h_step?: number; + p_count?: number; + l_l_min?: number; + l_l_step?: number; + d_l_step?: number; + l_c_min?: number; + l_c_step?: number; + d_c_step?: number; +}; + +// ============================================================================ +// Classes +// ============================================================================ + +export class ColorScheme { + + public config: ColorSchemeConfig | any; + public names: any; + public colorList: ColorSwatch[]; + public colorDict: Record>; + + constructor(config: ColorSchemeConfig, names: any) { + // Initialize colorList and other properties based on config + this.config = config; + this.names = names; + this.colorList = []; + this.colorDict = {}; + this.initializeColors(); + } + + private initializeColors(): void { + // Logic to initialize colorList based on the provided configuration + + const l_count = Math.ceil(this.config.p_count / 2); + const d_count = Math.floor(this.config.p_count / 2); + const d_l_min = this.config.l_l_min + (this.config.l_l_step * (l_count-1)); + const d_c_min = this.config.l_c_min + (this.config.l_c_step * (l_count-1)); + + // Create LC lists + // -------------------------------------------------------------------- + // const l_list = [0]; + // const c_list = [0]; + const l_list = []; + const c_list = []; + for (let i = 0; i < this.config.p_count; i ++) { + let l_cur = this.config.l_l_min + this.config.l_l_step + i * this.config.l_l_step -2*i; + l_list.push(l_cur); + }; + for (let i = 0; i < l_count; i ++) { + let c_cur = this.config.l_c_min + i * this.config.l_c_step; + c_list.push(c_cur); + }; + for (let i = 0; i < d_count; i ++) { + let c_cur = d_c_min + this.config.d_c_step + i *this.config.d_c_step; + c_list.push(c_cur); + }; + + // Create hue.gl + // -------------------------------------------------------------------- + // for (let h = this.config.h_step; h <= 360; h += this.config.h_step) { + for (let h = 0; h <= 360; h += this.config.h_step) { + + let h_group: Record = {}; + // let h_group_name = h.toString(); + let h_group_name = this.names[h];; + + + + for (let i = 0; i < this.config.p_count; i ++) { + let l_cur = l_list[i]; + let c_cur = c_list[i]; + if (h == 0) { + c_cur = 0; + }; + + let name = this.config.prefix + pad(h.toString(), 3, "0") + (i + 1).toString(); + let color = new ColorSwatch(h, c_cur, l_cur, name) + this.colorList.push(color); + h_group[name] = color; + }; + + this.colorDict[h_group_name] = h_group; + + } + } + + public getColorList(): ColorSwatch[] { + return this.colorList; + } + + public getColorDict(): Record> { + return this.colorDict; + } + +} diff --git a/src/ts/color/ColorSwatch.ts b/src/ts/color/ColorSwatch.ts new file mode 100644 index 0000000..013bbdc --- /dev/null +++ b/src/ts/color/ColorSwatch.ts @@ -0,0 +1,327 @@ + +// Copyright 2023 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +// ============================================================================ +// Import +// ============================================================================ + +import Color from 'colorjs.io'; +import { rgb2cmyk, convertRGBtoHex } from '../util.js'; + + +// ============================================================================ +// Classes +// ============================================================================ + +export class ColorSwatch { + public name?: string; + public h: number = 0; // Hue (0-360) + public c: number = 0; // Chroma (0-100) + public l: number = 0; // Luminance (0-100) + public model: Color; + + constructor(h: number, c: number, l: number, name?: string) { + if (h < 0 || h > 360 || c < 0 || c > 100 || l < 0 || l > 100) { + throw new Error("Invalid HCL values"); + } + this.h = h; + this.c = c; + this.l = l; + // this.setHCL(h, c, l); + this.name = name; + this.model = new Color("lch", [l, c, h]);; + } + + setHCL(h: number, c: number, l: number): void { + if (h < 0 || h > 360 || c < 0 || c > 100 || l < 0 || l > 100) { + throw new Error("Invalid HCL values"); + } + this.h = h; + this.c = c; + this.l = l; + } + + /// Color Gamut Checks + checkGamut(color_constant: Color): boolean { + let lch_in_gamut = (color_constant.to("lch")).inGamut(); + let srgb_in_gamut = (color_constant.to("srgb")).inGamut(); + let argb_in_gamut = (color_constant.to("a98rgb")).inGamut(); + // console.log(argb_in_gamut); + + let in_gamut; + if ( + lch_in_gamut == false || + srgb_in_gamut == false || + argb_in_gamut == false + ) { + in_gamut = false; + // color_object = new Color("white"); + } else { + in_gamut = true; + + } + return in_gamut; + } + + + + getName(): string | undefined { + return this.name; + } + + // HCL(): [number, number, number] { + // return [this.h, this.c, this.l]; + // } + + getRGB(): [number, number, number] { + // const color_constant = new Color("lch", [l, c, h]); + // let color_object = color_constant + // Convert HCL to RGB here + // This is a non-trivial conversion and may require a detailed algorithm or library + // Placeholder for conversion logic + return [0, 0, 0]; // Replace with actual conversion logic + } + + // Color Space Conversions + // ======================================================================== + + a98rgb() { + let color = this.model.to("a98rgb"); + return color.coords; + } + + a98rgb_linear() { + let color = this.model.to("a98rgb-linear"); + return color.coords; + } + + acescg() { + let color = this.model.to("acescg"); + return color.coords; + } + + hsl() { + let color = this.model.to("hsl"); + return color.coords; + } + + hsv() { + let color = this.model.to("hsv"); + return color.coords; + } + + hwb() { + let color = this.model.to("hwb"); + return color.coords; + } + + ictcp() { + let color = this.model.to("ictcp"); + return color.coords; + } + + jzczhz() { + let color = this.model.to("jzczhz"); + return color.coords; + } + + jzazbz() { + let color = this.model.to("jzazbz"); + return color.coords; + } + + lab() { + let color = this.model.to("lab"); + return color.coords; + } + + lab_d65() { + let color = this.model.to("lab-d65"); + return color.coords; + } + + lch() { + let color = this.model.to("lch"); + return color.coords; + } + + oklch() { + let color = this.model.to("oklch"); + return color.coords; + } + + oklab() { + let color = this.model.to("oklab"); + return color.coords; + } + + p3() { + let color = this.model.to("p3"); + return color.coords; + } + + p3_linear() { + let color = this.model.to("p3-linear"); + return color.coords; + } + + prophoto() { + let color = this.model.to("prophoto"); + return color.coords; + } + + prophoto_linear() { + let color = this.model.to("prophoto-linear"); + return color.coords; + } + + rec2020() { + let color = this.model.to("rec2020"); + return color.coords; + } + + rec2020_linear() { + let color = this.model.to("rec2020-linear"); + return color.coords; + } + + rec2100hlg() { + let color = this.model.to("rec2100hlg"); + return color.coords; + } + + rec2100pq() { + let color = this.model.to("rec2100pq"); + return color.coords; + } + + xyz_abs_d65() { + let color = this.model.to("xyz-abs-d65"); + return color.coords; + } + + xyz_d50() { + let color = this.model.to("xyz-d50"); + return color.coords; + } + + xyz_d65() { + let color = this.model.to("xyz-d65"); + return color.coords; + } + + xyz() { + let color = this.model.to("xyz"); + return color.coords; + } + + srgb() { + let color = this.model.to("srgb"); + return color; + } + + srgb_linear() { + let color = this.model.to("srgb-linear"); + return color.coords; + } + + hex() { + + let color = this.srgb(); + let hex = convertRGBtoHex( + Math.round(color.coords[0]*255), + Math.round(color.coords[1]*255), + Math.round(color.coords[2]*255), + ); + // console.log(color.coords[0]); + return hex; + + } + + hcl() { + + let hcl = { + "h": this.h, + "c": this.c, + "l": this.l, + } + return hcl; + + + } + // rgb() { + // let color = this.srgb(); + + // let rgb = ( + // Math.round(color.coords[0]*255), + // Math.round(color.coords[1]*255), + // Math.round(color.coords[2]*255) + // ); + // return rgb; + + // } + + rgb() { + let color = this.srgb(); + + let rgb = { + "r": Math.round(color.coords[0]*255), + "g": Math.round(color.coords[1]*255), + "b": Math.round(color.coords[2]*255) + } + return rgb; + + } + + // cmyk() { + // let color_srgb = this.srgb; + // let cmyk = rgb2cmyk( + // color_srgb[0], + // color_srgb[1], + // color_srgb[2], + // false + // ); + // let color = this.model.to("srgb-linear"); + // return color.coords; + // } + + + // // Color Strings + // // -------------------------------------------------------- + // let color_css = color_object + + // let color_string_rgb = color_srgb.toString({precision: 3, format: "rgb"}); + // let color_string_rgba = color_srgb.toString({precision: 3, format: "rgba"}); + // let color_string_hex = color_srgb.toString({precision: 3, format: "hex"}); + // let color_string_color = color_srgb.toString({precision: 3, format: "color"}); + + + toString(): string { + const [r, g, b] = this.getRGB(); + return `rgb(${r}, ${g}, ${b})`; + } + + toDict(): Record { + return { + name: this.name, + hcl_h: this.h, + hcl_c: this.c, + hcl_l: this.l, + }; + } + + // Static methods for creating Color from other formats can be added here +} diff --git a/src/ts/color/index.ts b/src/ts/color/index.ts new file mode 100644 index 0000000..d3c47a2 --- /dev/null +++ b/src/ts/color/index.ts @@ -0,0 +1,18 @@ +// Copyright 2024 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +export { ColorScheme } from './ColorScheme'; +export { ColorSwatch } from './ColorSwatch'; +export { ColorPicker } from './ColorPicker'; diff --git a/src/ts/config/hue.config.ts b/src/ts/config/hue.config.ts new file mode 100644 index 0000000..2e48850 --- /dev/null +++ b/src/ts/config/hue.config.ts @@ -0,0 +1,35 @@ +// hue/config/hue.config.ts + +// Copyright 2023 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +// ============================================================================ +// Constants +// ============================================================================ + +export const hueConfig = { + + prefix: "N", + h_step: 15, + p_count: 9, + l_l_min: 96, + l_l_step: -6, + d_l_step: -6, + l_c_min: 12, + l_c_step: 6, + d_c_step: -6, + +}; + diff --git a/src/ts/config/hue.names.ts b/src/ts/config/hue.names.ts new file mode 100644 index 0000000..85a334b --- /dev/null +++ b/src/ts/config/hue.names.ts @@ -0,0 +1,48 @@ +// hue/config/hue.names.ts + +// Copyright 2023 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +// ============================================================================ +// Constants +// ============================================================================ + +export const hueNames = { + 0: "Grey", + 15: "Salmon", + 30: "Orange", + 45: "Amber", + 60: "Yellow", // Fixed + 75: "Lime", + 90: "Ecru", + 105: "Olive", + 120: "Green", // Fixed + 135: "Forest", + 150: "Jade", + 165: "Mint", + 180: "Cyan", // Fixed + 195: "Teal", + 210: "Capri", + 225: "Sky", + 240: "Blue", // Fixed + 255: "Azure", + 270: "Indigo", + 285: "Violet", + 300: "Magenta", // Fixed + 315: "Purple", + 330: "Rose", + 345: "Pink", + 360: "Red", // Fixed +}; diff --git a/src/ts/config/index.ts b/src/ts/config/index.ts new file mode 100644 index 0000000..d94765a --- /dev/null +++ b/src/ts/config/index.ts @@ -0,0 +1,18 @@ +// Copyright 2024 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +export { hueConfig } from './hue.config'; +export { hueNames } from './hue.names'; + diff --git a/src/ts/constants/hue_hcl.ts b/src/ts/constants/hue_hcl.ts new file mode 100644 index 0000000..28d7909 --- /dev/null +++ b/src/ts/constants/hue_hcl.ts @@ -0,0 +1,356 @@ +// Copyright 2023 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ============================================================================ +// +// hue.gl +// 0.0.11 +// +// ============================================================================ + + +// General +// ============================================================================ + +export enum hue_hcl { + + // Grey + // ------------------------------------------------------------------------ + + N0001 = "hcl(0, 0, 90)", + N0002 = "hcl(0, 0, 82)", + N0003 = "hcl(0, 0, 74)", + N0004 = "hcl(0, 0, 66)", + N0005 = "hcl(0, 0, 58)", + N0006 = "hcl(0, 0, 50)", + N0007 = "hcl(0, 0, 42)", + N0008 = "hcl(0, 0, 34)", + N0009 = "hcl(0, 0, 26)", + + // Salmon + // ------------------------------------------------------------------------ + + N0151 = "hcl(15, 12, 90)", + N0152 = "hcl(15, 18, 82)", + N0153 = "hcl(15, 24, 74)", + N0154 = "hcl(15, 30, 66)", + N0155 = "hcl(15, 36, 58)", + N0156 = "hcl(15, 30, 50)", + N0157 = "hcl(15, 24, 42)", + N0158 = "hcl(15, 18, 34)", + N0159 = "hcl(15, 12, 26)", + + // Orange + // ------------------------------------------------------------------------ + + N0301 = "hcl(30, 12, 90)", + N0302 = "hcl(30, 18, 82)", + N0303 = "hcl(30, 24, 74)", + N0304 = "hcl(30, 30, 66)", + N0305 = "hcl(30, 36, 58)", + N0306 = "hcl(30, 30, 50)", + N0307 = "hcl(30, 24, 42)", + N0308 = "hcl(30, 18, 34)", + N0309 = "hcl(30, 12, 26)", + + // Amber + // ------------------------------------------------------------------------ + + N0451 = "hcl(45, 12, 90)", + N0452 = "hcl(45, 18, 82)", + N0453 = "hcl(45, 24, 74)", + N0454 = "hcl(45, 30, 66)", + N0455 = "hcl(45, 36, 58)", + N0456 = "hcl(45, 30, 50)", + N0457 = "hcl(45, 24, 42)", + N0458 = "hcl(45, 18, 34)", + N0459 = "hcl(45, 12, 26)", + + // Yellow + // ------------------------------------------------------------------------ + + N0601 = "hcl(60, 12, 90)", + N0602 = "hcl(60, 18, 82)", + N0603 = "hcl(60, 24, 74)", + N0604 = "hcl(60, 30, 66)", + N0605 = "hcl(60, 36, 58)", + N0606 = "hcl(60, 30, 50)", + N0607 = "hcl(60, 24, 42)", + N0608 = "hcl(60, 18, 34)", + N0609 = "hcl(60, 12, 26)", + + // Lime + // ------------------------------------------------------------------------ + + N0751 = "hcl(75, 12, 90)", + N0752 = "hcl(75, 18, 82)", + N0753 = "hcl(75, 24, 74)", + N0754 = "hcl(75, 30, 66)", + N0755 = "hcl(75, 36, 58)", + N0756 = "hcl(75, 30, 50)", + N0757 = "hcl(75, 24, 42)", + N0758 = "hcl(75, 18, 34)", + N0759 = "hcl(75, 12, 26)", + + // Ecru + // ------------------------------------------------------------------------ + + N0901 = "hcl(90, 12, 90)", + N0902 = "hcl(90, 18, 82)", + N0903 = "hcl(90, 24, 74)", + N0904 = "hcl(90, 30, 66)", + N0905 = "hcl(90, 36, 58)", + N0906 = "hcl(90, 30, 50)", + N0907 = "hcl(90, 24, 42)", + N0908 = "hcl(90, 18, 34)", + N0909 = "hcl(90, 12, 26)", + + // Olive + // ------------------------------------------------------------------------ + + N1051 = "hcl(105, 12, 90)", + N1052 = "hcl(105, 18, 82)", + N1053 = "hcl(105, 24, 74)", + N1054 = "hcl(105, 30, 66)", + N1055 = "hcl(105, 36, 58)", + N1056 = "hcl(105, 30, 50)", + N1057 = "hcl(105, 24, 42)", + N1058 = "hcl(105, 18, 34)", + N1059 = "hcl(105, 12, 26)", + + // Green + // ------------------------------------------------------------------------ + + N1201 = "hcl(120, 12, 90)", + N1202 = "hcl(120, 18, 82)", + N1203 = "hcl(120, 24, 74)", + N1204 = "hcl(120, 30, 66)", + N1205 = "hcl(120, 36, 58)", + N1206 = "hcl(120, 30, 50)", + N1207 = "hcl(120, 24, 42)", + N1208 = "hcl(120, 18, 34)", + N1209 = "hcl(120, 12, 26)", + + // Forest + // ------------------------------------------------------------------------ + + N1351 = "hcl(135, 12, 90)", + N1352 = "hcl(135, 18, 82)", + N1353 = "hcl(135, 24, 74)", + N1354 = "hcl(135, 30, 66)", + N1355 = "hcl(135, 36, 58)", + N1356 = "hcl(135, 30, 50)", + N1357 = "hcl(135, 24, 42)", + N1358 = "hcl(135, 18, 34)", + N1359 = "hcl(135, 12, 26)", + + // Jade + // ------------------------------------------------------------------------ + + N1501 = "hcl(150, 12, 90)", + N1502 = "hcl(150, 18, 82)", + N1503 = "hcl(150, 24, 74)", + N1504 = "hcl(150, 30, 66)", + N1505 = "hcl(150, 36, 58)", + N1506 = "hcl(150, 30, 50)", + N1507 = "hcl(150, 24, 42)", + N1508 = "hcl(150, 18, 34)", + N1509 = "hcl(150, 12, 26)", + + // Mint + // ------------------------------------------------------------------------ + + N1651 = "hcl(165, 12, 90)", + N1652 = "hcl(165, 18, 82)", + N1653 = "hcl(165, 24, 74)", + N1654 = "hcl(165, 30, 66)", + N1655 = "hcl(165, 36, 58)", + N1656 = "hcl(165, 30, 50)", + N1657 = "hcl(165, 24, 42)", + N1658 = "hcl(165, 18, 34)", + N1659 = "hcl(165, 12, 26)", + + // Cyan + // ------------------------------------------------------------------------ + + N1801 = "hcl(180, 12, 90)", + N1802 = "hcl(180, 18, 82)", + N1803 = "hcl(180, 24, 74)", + N1804 = "hcl(180, 30, 66)", + N1805 = "hcl(180, 36, 58)", + N1806 = "hcl(180, 30, 50)", + N1807 = "hcl(180, 24, 42)", + N1808 = "hcl(180, 18, 34)", + N1809 = "hcl(180, 12, 26)", + + // Teal + // ------------------------------------------------------------------------ + + N1951 = "hcl(195, 12, 90)", + N1952 = "hcl(195, 18, 82)", + N1953 = "hcl(195, 24, 74)", + N1954 = "hcl(195, 30, 66)", + N1955 = "hcl(195, 36, 58)", + N1956 = "hcl(195, 30, 50)", + N1957 = "hcl(195, 24, 42)", + N1958 = "hcl(195, 18, 34)", + N1959 = "hcl(195, 12, 26)", + + // Capri + // ------------------------------------------------------------------------ + + N2101 = "hcl(210, 12, 90)", + N2102 = "hcl(210, 18, 82)", + N2103 = "hcl(210, 24, 74)", + N2104 = "hcl(210, 30, 66)", + N2105 = "hcl(210, 36, 58)", + N2106 = "hcl(210, 30, 50)", + N2107 = "hcl(210, 24, 42)", + N2108 = "hcl(210, 18, 34)", + N2109 = "hcl(210, 12, 26)", + + // Sky + // ------------------------------------------------------------------------ + + N2251 = "hcl(225, 12, 90)", + N2252 = "hcl(225, 18, 82)", + N2253 = "hcl(225, 24, 74)", + N2254 = "hcl(225, 30, 66)", + N2255 = "hcl(225, 36, 58)", + N2256 = "hcl(225, 30, 50)", + N2257 = "hcl(225, 24, 42)", + N2258 = "hcl(225, 18, 34)", + N2259 = "hcl(225, 12, 26)", + + // Blue + // ------------------------------------------------------------------------ + + N2401 = "hcl(240, 12, 90)", + N2402 = "hcl(240, 18, 82)", + N2403 = "hcl(240, 24, 74)", + N2404 = "hcl(240, 30, 66)", + N2405 = "hcl(240, 36, 58)", + N2406 = "hcl(240, 30, 50)", + N2407 = "hcl(240, 24, 42)", + N2408 = "hcl(240, 18, 34)", + N2409 = "hcl(240, 12, 26)", + + // Azure + // ------------------------------------------------------------------------ + + N2551 = "hcl(255, 12, 90)", + N2552 = "hcl(255, 18, 82)", + N2553 = "hcl(255, 24, 74)", + N2554 = "hcl(255, 30, 66)", + N2555 = "hcl(255, 36, 58)", + N2556 = "hcl(255, 30, 50)", + N2557 = "hcl(255, 24, 42)", + N2558 = "hcl(255, 18, 34)", + N2559 = "hcl(255, 12, 26)", + + // Indigo + // ------------------------------------------------------------------------ + + N2701 = "hcl(270, 12, 90)", + N2702 = "hcl(270, 18, 82)", + N2703 = "hcl(270, 24, 74)", + N2704 = "hcl(270, 30, 66)", + N2705 = "hcl(270, 36, 58)", + N2706 = "hcl(270, 30, 50)", + N2707 = "hcl(270, 24, 42)", + N2708 = "hcl(270, 18, 34)", + N2709 = "hcl(270, 12, 26)", + + // Violet + // ------------------------------------------------------------------------ + + N2851 = "hcl(285, 12, 90)", + N2852 = "hcl(285, 18, 82)", + N2853 = "hcl(285, 24, 74)", + N2854 = "hcl(285, 30, 66)", + N2855 = "hcl(285, 36, 58)", + N2856 = "hcl(285, 30, 50)", + N2857 = "hcl(285, 24, 42)", + N2858 = "hcl(285, 18, 34)", + N2859 = "hcl(285, 12, 26)", + + // Magenta + // ------------------------------------------------------------------------ + + N3001 = "hcl(300, 12, 90)", + N3002 = "hcl(300, 18, 82)", + N3003 = "hcl(300, 24, 74)", + N3004 = "hcl(300, 30, 66)", + N3005 = "hcl(300, 36, 58)", + N3006 = "hcl(300, 30, 50)", + N3007 = "hcl(300, 24, 42)", + N3008 = "hcl(300, 18, 34)", + N3009 = "hcl(300, 12, 26)", + + // Purple + // ------------------------------------------------------------------------ + + N3151 = "hcl(315, 12, 90)", + N3152 = "hcl(315, 18, 82)", + N3153 = "hcl(315, 24, 74)", + N3154 = "hcl(315, 30, 66)", + N3155 = "hcl(315, 36, 58)", + N3156 = "hcl(315, 30, 50)", + N3157 = "hcl(315, 24, 42)", + N3158 = "hcl(315, 18, 34)", + N3159 = "hcl(315, 12, 26)", + + // Rose + // ------------------------------------------------------------------------ + + N3301 = "hcl(330, 12, 90)", + N3302 = "hcl(330, 18, 82)", + N3303 = "hcl(330, 24, 74)", + N3304 = "hcl(330, 30, 66)", + N3305 = "hcl(330, 36, 58)", + N3306 = "hcl(330, 30, 50)", + N3307 = "hcl(330, 24, 42)", + N3308 = "hcl(330, 18, 34)", + N3309 = "hcl(330, 12, 26)", + + // Pink + // ------------------------------------------------------------------------ + + N3451 = "hcl(345, 12, 90)", + N3452 = "hcl(345, 18, 82)", + N3453 = "hcl(345, 24, 74)", + N3454 = "hcl(345, 30, 66)", + N3455 = "hcl(345, 36, 58)", + N3456 = "hcl(345, 30, 50)", + N3457 = "hcl(345, 24, 42)", + N3458 = "hcl(345, 18, 34)", + N3459 = "hcl(345, 12, 26)", + + // Red + // ------------------------------------------------------------------------ + + N3601 = "hcl(360, 12, 90)", + N3602 = "hcl(360, 18, 82)", + N3603 = "hcl(360, 24, 74)", + N3604 = "hcl(360, 30, 66)", + N3605 = "hcl(360, 36, 58)", + N3606 = "hcl(360, 30, 50)", + N3607 = "hcl(360, 24, 42)", + N3608 = "hcl(360, 18, 34)", + N3609 = "hcl(360, 12, 26)", + + +} + + diff --git a/src/ts/constants/hue_hex.ts b/src/ts/constants/hue_hex.ts new file mode 100644 index 0000000..ef10c59 --- /dev/null +++ b/src/ts/constants/hue_hex.ts @@ -0,0 +1,356 @@ +// Copyright 2023 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ============================================================================ +// +// hue.gl +// 0.0.11 +// +// ============================================================================ + + +// General +// ============================================================================ + +export enum hue_hex { + + // Grey + // ------------------------------------------------------------------------ + + N0001 = '#e2e2e2', + N0002 = '#cccccc', + N0003 = '#b6b6b6', + N0004 = '#a0a0a0', + N0005 = '#8b8b8b', + N0006 = '#777777', + N0007 = '#636363', + N0008 = '#505050', + N0009 = '#3e3e3e', + + // Salmon + // ------------------------------------------------------------------------ + + N0151 = '#fadbdd', + N0152 = '#eec0c4', + N0153 = '#e2a6ac', + N0154 = '#d48c94', + N0155 = '#c6727d', + N0156 = '#a7636b', + N0157 = '#89545a', + N0158 = '#6b4549', + N0159 = '#4f3739', + + // Orange + // ------------------------------------------------------------------------ + + N0301 = '#fadbd7', + N0302 = '#edc1bc', + N0303 = '#e0a8a1', + N0304 = '#d28e87', + N0305 = '#c4756e', + N0306 = '#a5655f', + N0307 = '#875650', + N0308 = '#6b4642', + N0309 = '#4f3835', + + // Amber + // ------------------------------------------------------------------------ + + N0451 = '#f8dcd3', + N0452 = '#eac3b5', + N0453 = '#dcaa98', + N0454 = '#cd927c', + N0455 = '#be7960', + N0456 = '#a06954', + N0457 = '#845848', + N0458 = '#68483c', + N0459 = '#4d3931', + + // Yellow + // ------------------------------------------------------------------------ + + N0601 = '#f4decf', + N0602 = '#e5c6af', + N0603 = '#d5ad90', + N0604 = '#c59672', + N0605 = '#b57f55', + N0606 = '#996d4b', + N0607 = '#7e5b41', + N0608 = '#644a38', + N0609 = '#4a3a2e', + + // Lime + // ------------------------------------------------------------------------ + + N0751 = '#efe0cc', + N0752 = '#dec8ac', + N0753 = '#cdb18c', + N0754 = '#bb9b6c', + N0755 = '#a9854e', + N0756 = '#8f7145', + N0757 = '#765f3d', + N0758 = '#5e4d34', + N0759 = '#473c2c', + + // Ecru + // ------------------------------------------------------------------------ + + N0901 = '#eae2cb', + N0902 = '#d6cbaa', + N0903 = '#c2b58a', + N0904 = '#af9f6a', + N0905 = '#9b8a4b', + N0906 = '#847643', + N0907 = '#6d623b', + N0908 = '#584f33', + N0909 = '#433d2b', + + // Olive + // ------------------------------------------------------------------------ + + N1051 = '#e3e4cc', + N1052 = '#cdceab', + N1053 = '#b7b98b', + N1054 = '#a1a46b', + N1055 = '#8b8f4c', + N1056 = '#777a44', + N1057 = '#63663c', + N1058 = '#505234', + N1059 = '#3e3f2c', + + // Green + // ------------------------------------------------------------------------ + + N1201 = '#dde6ce', + N1202 = '#c4d1ae', + N1203 = '#abbc8f', + N1204 = '#92a870', + N1205 = '#7a9453', + N1206 = '#697e49', + N1207 = '#586840', + N1208 = '#485437', + N1209 = '#39402d', + + // Forest + // ------------------------------------------------------------------------ + + N1351 = '#d7e7d2', + N1352 = '#bbd3b3', + N1353 = '#9fbf96', + N1354 = '#83ab79', + N1355 = '#68975d', + N1356 = '#5a8151', + N1357 = '#4d6b46', + N1358 = '#40553b', + N1359 = '#344130', + + // Jade + // ------------------------------------------------------------------------ + + N1501 = '#d1e8d6', + N1502 = '#b2d4ba', + N1503 = '#93c19f', + N1504 = '#74ad84', + N1505 = '#559a6a', + N1506 = '#4b835c', + N1507 = '#426c4e', + N1508 = '#395741', + N1509 = '#2f4234', + + // Mint + // ------------------------------------------------------------------------ + + N1651 = '#cde9dc', + N1652 = '#abd6c2', + N1653 = '#89c2a9', + N1654 = '#66af91', + N1655 = '#409b7a', + N1656 = '#3c8469', + N1657 = '#376d58', + N1658 = '#315848', + N1659 = '#2b4338', + + // Cyan + // ------------------------------------------------------------------------ + + N1801 = '#c9e9e2', + N1802 = '#a6d6cb', + N1803 = '#81c3b5', + N1804 = '#5baf9f', + N1805 = '#2a9c8a', + N1806 = '#2d8576', + N1807 = '#2d6e62', + N1808 = '#2b584f', + N1809 = '#28433d', + + // Teal + // ------------------------------------------------------------------------ + + N1951 = '#c8e9e8', + N1952 = '#a3d6d4', + N1953 = '#7dc3c0', + N1954 = '#53afad', + N1955 = '#109c9a', + N1956 = '#208583', + N1957 = '#266e6d', + N1958 = '#275857', + N1959 = '#264342', + + // Capri + // ------------------------------------------------------------------------ + + N2101 = '#c8e9ed', + N2102 = '#a3d5dc', + N2103 = '#7dc2cb', + N2104 = '#52aeba', + N2105 = '#019baa', + N2106 = '#1c8490', + N2107 = '#246d76', + N2108 = '#27575e', + N2109 = '#264246', + + // Sky + // ------------------------------------------------------------------------ + + N2251 = '#cae8f2', + N2252 = '#a6d4e3', + N2253 = '#81c0d4', + N2254 = '#58acc6', + N2255 = '#1a99b7', + N2256 = '#25829a', + N2257 = '#2a6c7e', + N2258 = '#2a5664', + N2259 = '#27424a', + + // Blue + // ------------------------------------------------------------------------ + + N2401 = '#cee6f6', + N2402 = '#acd2e9', + N2403 = '#8abedc', + N2404 = '#65aace', + N2405 = '#3696c1', + N2406 = '#3680a3', + N2407 = '#346a85', + N2408 = '#305568', + N2409 = '#2b414d', + + // Azure + // ------------------------------------------------------------------------ + + N2551 = '#d3e5f8', + N2552 = '#b5cfec', + N2553 = '#95bbe0', + N2554 = '#75a6d4', + N2555 = '#5192c8', + N2556 = '#497ca8', + N2557 = '#416789', + N2558 = '#39536b', + N2559 = '#303f4f', + + // Indigo + // ------------------------------------------------------------------------ + + N2701 = '#dae3f9', + N2702 = '#becdee', + N2703 = '#a3b7e2', + N2704 = '#87a2d6', + N2705 = '#6a8dca', + N2706 = '#5d78aa', + N2707 = '#4f648b', + N2708 = '#42516c', + N2709 = '#353e50', + + // Violet + // ------------------------------------------------------------------------ + + N2851 = '#e0e1f9', + N2852 = '#c8caed', + N2853 = '#b1b3e1', + N2854 = '#999dd5', + N2855 = '#8188c8', + N2856 = '#6f74a8', + N2857 = '#5d6189', + N2858 = '#4c4e6c', + N2859 = '#3b3c4f', + + // Magenta + // ------------------------------------------------------------------------ + + N3001 = '#e7dff6', + N3002 = '#d3c7e9', + N3003 = '#beafdc', + N3004 = '#aa98cf', + N3005 = '#9582c2', + N3006 = '#7f6fa3', + N3007 = '#6a5d86', + N3008 = '#554c69', + N3009 = '#413b4d', + + // Purple + // ------------------------------------------------------------------------ + + N3151 = '#edddf3', + N3152 = '#dcc4e4', + N3153 = '#caacd6', + N3154 = '#b994c7', + N3155 = '#a77cb9', + N3156 = '#8d6b9c', + N3157 = '#755a7f', + N3158 = '#5d4964', + N3159 = '#46394b', + + // Rose + // ------------------------------------------------------------------------ + + N3301 = '#f3dcee', + N3302 = '#e3c2dd', + N3303 = '#d4a9cd', + N3304 = '#c590bc', + N3305 = '#b577ac', + N3306 = '#996791', + N3307 = '#7d5777', + N3308 = '#63475f', + N3309 = '#4a3847', + + // Pink + // ------------------------------------------------------------------------ + + N3451 = '#f7dbe9', + N3452 = '#e9c1d5', + N3453 = '#dba7c2', + N3454 = '#cd8daf', + N3455 = '#bf739d', + N3456 = '#a16485', + N3457 = '#84546e', + N3458 = '#684658', + N3459 = '#4d3743', + + // Red + // ------------------------------------------------------------------------ + + N3601 = '#f9dbe3', + N3602 = '#edc0cd', + N3603 = '#e0a6b7', + N3604 = '#d38ca2', + N3605 = '#c5728d', + N3606 = '#a66278', + N3607 = '#885464', + N3608 = '#6b4551', + N3609 = '#4f373e', + + +} + + diff --git a/src/ts/constants/hue_rgb.ts b/src/ts/constants/hue_rgb.ts new file mode 100644 index 0000000..e056d12 --- /dev/null +++ b/src/ts/constants/hue_rgb.ts @@ -0,0 +1,356 @@ +// Copyright 2023 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ============================================================================ +// +// hue.gl +// 0.0.11 +// +// ============================================================================ + + +// General +// ============================================================================ + +export enum hue_rgb { + + // Grey + // ------------------------------------------------------------------------ + + N0001 = "rgb(226, 226, 226)", + N0002 = "rgb(204, 204, 204)", + N0003 = "rgb(182, 182, 182)", + N0004 = "rgb(160, 160, 160)", + N0005 = "rgb(139, 139, 139)", + N0006 = "rgb(119, 119, 119)", + N0007 = "rgb(99, 99, 99)", + N0008 = "rgb(80, 80, 80)", + N0009 = "rgb(62, 62, 62)", + + // Salmon + // ------------------------------------------------------------------------ + + N0151 = "rgb(250, 219, 221)", + N0152 = "rgb(238, 192, 196)", + N0153 = "rgb(226, 166, 172)", + N0154 = "rgb(212, 140, 148)", + N0155 = "rgb(198, 114, 125)", + N0156 = "rgb(167, 99, 107)", + N0157 = "rgb(137, 84, 90)", + N0158 = "rgb(107, 69, 73)", + N0159 = "rgb(79, 55, 57)", + + // Orange + // ------------------------------------------------------------------------ + + N0301 = "rgb(250, 219, 215)", + N0302 = "rgb(237, 193, 188)", + N0303 = "rgb(224, 168, 161)", + N0304 = "rgb(210, 142, 135)", + N0305 = "rgb(196, 117, 110)", + N0306 = "rgb(165, 101, 95)", + N0307 = "rgb(135, 86, 80)", + N0308 = "rgb(107, 70, 66)", + N0309 = "rgb(79, 56, 53)", + + // Amber + // ------------------------------------------------------------------------ + + N0451 = "rgb(248, 220, 211)", + N0452 = "rgb(234, 195, 181)", + N0453 = "rgb(220, 170, 152)", + N0454 = "rgb(205, 146, 124)", + N0455 = "rgb(190, 121, 96)", + N0456 = "rgb(160, 105, 84)", + N0457 = "rgb(132, 88, 72)", + N0458 = "rgb(104, 72, 60)", + N0459 = "rgb(77, 57, 49)", + + // Yellow + // ------------------------------------------------------------------------ + + N0601 = "rgb(244, 222, 207)", + N0602 = "rgb(229, 198, 175)", + N0603 = "rgb(213, 173, 144)", + N0604 = "rgb(197, 150, 114)", + N0605 = "rgb(181, 127, 85)", + N0606 = "rgb(153, 109, 75)", + N0607 = "rgb(126, 91, 65)", + N0608 = "rgb(100, 74, 56)", + N0609 = "rgb(74, 58, 46)", + + // Lime + // ------------------------------------------------------------------------ + + N0751 = "rgb(239, 224, 204)", + N0752 = "rgb(222, 200, 172)", + N0753 = "rgb(205, 177, 140)", + N0754 = "rgb(187, 155, 108)", + N0755 = "rgb(169, 133, 78)", + N0756 = "rgb(143, 113, 69)", + N0757 = "rgb(118, 95, 61)", + N0758 = "rgb(94, 77, 52)", + N0759 = "rgb(71, 60, 44)", + + // Ecru + // ------------------------------------------------------------------------ + + N0901 = "rgb(234, 226, 203)", + N0902 = "rgb(214, 203, 170)", + N0903 = "rgb(194, 181, 138)", + N0904 = "rgb(175, 159, 106)", + N0905 = "rgb(155, 138, 75)", + N0906 = "rgb(132, 118, 67)", + N0907 = "rgb(109, 98, 59)", + N0908 = "rgb(88, 79, 51)", + N0909 = "rgb(67, 61, 43)", + + // Olive + // ------------------------------------------------------------------------ + + N1051 = "rgb(227, 228, 204)", + N1052 = "rgb(205, 206, 171)", + N1053 = "rgb(183, 185, 139)", + N1054 = "rgb(161, 164, 107)", + N1055 = "rgb(139, 143, 76)", + N1056 = "rgb(119, 122, 68)", + N1057 = "rgb(99, 102, 60)", + N1058 = "rgb(80, 82, 52)", + N1059 = "rgb(62, 63, 44)", + + // Green + // ------------------------------------------------------------------------ + + N1201 = "rgb(221, 230, 206)", + N1202 = "rgb(196, 209, 174)", + N1203 = "rgb(171, 188, 143)", + N1204 = "rgb(146, 168, 112)", + N1205 = "rgb(122, 148, 83)", + N1206 = "rgb(105, 126, 73)", + N1207 = "rgb(88, 104, 64)", + N1208 = "rgb(72, 84, 55)", + N1209 = "rgb(57, 64, 45)", + + // Forest + // ------------------------------------------------------------------------ + + N1351 = "rgb(215, 231, 210)", + N1352 = "rgb(187, 211, 179)", + N1353 = "rgb(159, 191, 150)", + N1354 = "rgb(131, 171, 121)", + N1355 = "rgb(104, 151, 93)", + N1356 = "rgb(90, 129, 81)", + N1357 = "rgb(77, 107, 70)", + N1358 = "rgb(64, 85, 59)", + N1359 = "rgb(52, 65, 48)", + + // Jade + // ------------------------------------------------------------------------ + + N1501 = "rgb(209, 232, 214)", + N1502 = "rgb(178, 212, 186)", + N1503 = "rgb(147, 193, 159)", + N1504 = "rgb(116, 173, 132)", + N1505 = "rgb(85, 154, 106)", + N1506 = "rgb(75, 131, 92)", + N1507 = "rgb(66, 108, 78)", + N1508 = "rgb(57, 87, 65)", + N1509 = "rgb(47, 66, 52)", + + // Mint + // ------------------------------------------------------------------------ + + N1651 = "rgb(205, 233, 220)", + N1652 = "rgb(171, 214, 194)", + N1653 = "rgb(137, 194, 169)", + N1654 = "rgb(102, 175, 145)", + N1655 = "rgb(64, 155, 122)", + N1656 = "rgb(60, 132, 105)", + N1657 = "rgb(55, 109, 88)", + N1658 = "rgb(49, 88, 72)", + N1659 = "rgb(43, 67, 56)", + + // Cyan + // ------------------------------------------------------------------------ + + N1801 = "rgb(201, 233, 226)", + N1802 = "rgb(166, 214, 203)", + N1803 = "rgb(129, 195, 181)", + N1804 = "rgb(91, 175, 159)", + N1805 = "rgb(42, 156, 138)", + N1806 = "rgb(45, 133, 118)", + N1807 = "rgb(45, 110, 98)", + N1808 = "rgb(43, 88, 79)", + N1809 = "rgb(40, 67, 61)", + + // Teal + // ------------------------------------------------------------------------ + + N1951 = "rgb(200, 233, 232)", + N1952 = "rgb(163, 214, 212)", + N1953 = "rgb(125, 195, 192)", + N1954 = "rgb(83, 175, 173)", + N1955 = "rgb(16, 156, 154)", + N1956 = "rgb(32, 133, 131)", + N1957 = "rgb(38, 110, 109)", + N1958 = "rgb(39, 88, 87)", + N1959 = "rgb(38, 67, 66)", + + // Capri + // ------------------------------------------------------------------------ + + N2101 = "rgb(200, 233, 237)", + N2102 = "rgb(163, 213, 220)", + N2103 = "rgb(125, 194, 203)", + N2104 = "rgb(82, 174, 186)", + N2105 = "rgb(1, 155, 170)", + N2106 = "rgb(28, 132, 144)", + N2107 = "rgb(36, 109, 118)", + N2108 = "rgb(39, 87, 94)", + N2109 = "rgb(38, 66, 70)", + + // Sky + // ------------------------------------------------------------------------ + + N2251 = "rgb(202, 232, 242)", + N2252 = "rgb(166, 212, 227)", + N2253 = "rgb(129, 192, 212)", + N2254 = "rgb(88, 172, 198)", + N2255 = "rgb(26, 153, 183)", + N2256 = "rgb(37, 130, 154)", + N2257 = "rgb(42, 108, 126)", + N2258 = "rgb(42, 86, 100)", + N2259 = "rgb(39, 66, 74)", + + // Blue + // ------------------------------------------------------------------------ + + N2401 = "rgb(206, 230, 246)", + N2402 = "rgb(172, 210, 233)", + N2403 = "rgb(138, 190, 220)", + N2404 = "rgb(101, 170, 206)", + N2405 = "rgb(54, 150, 193)", + N2406 = "rgb(54, 128, 163)", + N2407 = "rgb(52, 106, 133)", + N2408 = "rgb(48, 85, 104)", + N2409 = "rgb(43, 65, 77)", + + // Azure + // ------------------------------------------------------------------------ + + N2551 = "rgb(211, 229, 248)", + N2552 = "rgb(181, 207, 236)", + N2553 = "rgb(149, 187, 224)", + N2554 = "rgb(117, 166, 212)", + N2555 = "rgb(81, 146, 200)", + N2556 = "rgb(73, 124, 168)", + N2557 = "rgb(65, 103, 137)", + N2558 = "rgb(57, 83, 107)", + N2559 = "rgb(48, 63, 79)", + + // Indigo + // ------------------------------------------------------------------------ + + N2701 = "rgb(218, 227, 249)", + N2702 = "rgb(190, 205, 238)", + N2703 = "rgb(163, 183, 226)", + N2704 = "rgb(135, 162, 214)", + N2705 = "rgb(106, 141, 202)", + N2706 = "rgb(93, 120, 170)", + N2707 = "rgb(79, 100, 139)", + N2708 = "rgb(66, 81, 108)", + N2709 = "rgb(53, 62, 80)", + + // Violet + // ------------------------------------------------------------------------ + + N2851 = "rgb(224, 225, 249)", + N2852 = "rgb(200, 202, 237)", + N2853 = "rgb(177, 179, 225)", + N2854 = "rgb(153, 157, 213)", + N2855 = "rgb(129, 136, 200)", + N2856 = "rgb(111, 116, 168)", + N2857 = "rgb(93, 97, 137)", + N2858 = "rgb(76, 78, 108)", + N2859 = "rgb(59, 60, 79)", + + // Magenta + // ------------------------------------------------------------------------ + + N3001 = "rgb(231, 223, 246)", + N3002 = "rgb(211, 199, 233)", + N3003 = "rgb(190, 175, 220)", + N3004 = "rgb(170, 152, 207)", + N3005 = "rgb(149, 130, 194)", + N3006 = "rgb(127, 111, 163)", + N3007 = "rgb(106, 93, 134)", + N3008 = "rgb(85, 76, 105)", + N3009 = "rgb(65, 59, 77)", + + // Purple + // ------------------------------------------------------------------------ + + N3151 = "rgb(237, 221, 243)", + N3152 = "rgb(220, 196, 228)", + N3153 = "rgb(202, 172, 214)", + N3154 = "rgb(185, 148, 199)", + N3155 = "rgb(167, 124, 185)", + N3156 = "rgb(141, 107, 156)", + N3157 = "rgb(117, 90, 127)", + N3158 = "rgb(93, 73, 100)", + N3159 = "rgb(70, 57, 75)", + + // Rose + // ------------------------------------------------------------------------ + + N3301 = "rgb(243, 220, 238)", + N3302 = "rgb(227, 194, 221)", + N3303 = "rgb(212, 169, 205)", + N3304 = "rgb(197, 144, 188)", + N3305 = "rgb(181, 119, 172)", + N3306 = "rgb(153, 103, 145)", + N3307 = "rgb(125, 87, 119)", + N3308 = "rgb(99, 71, 95)", + N3309 = "rgb(74, 56, 71)", + + // Pink + // ------------------------------------------------------------------------ + + N3451 = "rgb(247, 219, 233)", + N3452 = "rgb(233, 193, 213)", + N3453 = "rgb(219, 167, 194)", + N3454 = "rgb(205, 141, 175)", + N3455 = "rgb(191, 115, 157)", + N3456 = "rgb(161, 100, 133)", + N3457 = "rgb(132, 84, 110)", + N3458 = "rgb(104, 70, 88)", + N3459 = "rgb(77, 55, 67)", + + // Red + // ------------------------------------------------------------------------ + + N3601 = "rgb(249, 219, 227)", + N3602 = "rgb(237, 192, 205)", + N3603 = "rgb(224, 166, 183)", + N3604 = "rgb(211, 140, 162)", + N3605 = "rgb(197, 114, 141)", + N3606 = "rgb(166, 98, 120)", + N3607 = "rgb(136, 84, 100)", + N3608 = "rgb(107, 69, 81)", + N3609 = "rgb(79, 55, 62)", + + +} + + diff --git a/src/ts/constants/index.ts b/src/ts/constants/index.ts new file mode 100644 index 0000000..45fde92 --- /dev/null +++ b/src/ts/constants/index.ts @@ -0,0 +1,18 @@ +// Copyright 2024 Scape Agency BV + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +export { hue_hex } from './hue_hex'; +export { hue_hcl } from './hue_hcl'; +export { hue_rgb } from './hue_rgb'; diff --git a/src/ts/index.ts b/src/ts/index.ts index 910db53..1c66c8c 100644 --- a/src/ts/index.ts +++ b/src/ts/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Scape Agency BV +// Copyright 2024 Scape Agency BV // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -13,4 +13,21 @@ // limitations under the License. -export {}; \ No newline at end of file +export { + ColorPicker, + ColorScheme, + ColorSwatch, +} from './color'; + + +export { + hueConfig, + hueNames, +} from './config'; + + +export { + hue_hex, + hue_hcl, + hue_rgb, +} from './constants'; \ No newline at end of file diff --git a/src/ts/util.ts b/src/ts/util.ts new file mode 100644 index 0000000..4497ed6 --- /dev/null +++ b/src/ts/util.ts @@ -0,0 +1,52 @@ + +// import Color from "https://colorjs.io/dist/color.js"; +// import Chroma from "https://cdnjs.cloudflare.com/ajax/libs/chroma-js/2.4.2/chroma.min.js"; + + + +export function rgb2cmyk(r: number, g: number, b: number, normalized: any){ + var c = 1 - (r / 255); + var m = 1 - (g / 255); + var y = 1 - (b / 255); + var k = Math.min(c, Math.min(m, y)); + + c = (c - k) / (1 - k); + m = (m - k) / (1 - k); + y = (y - k) / (1 - k); + + if(!normalized){ + c = Math.round(c * 10000) / 100; + m = Math.round(m * 10000) / 100; + y = Math.round(y * 10000) / 100; + k = Math.round(k * 10000) / 100; + } + + c = isNaN(c) ? 0 : c; + m = isNaN(m) ? 0 : m; + y = isNaN(y) ? 0 : y; + k = isNaN(k) ? 0 : k; + + return { + c: c, + m: m, + y: y, + k: k + } +} + +export function colorToHex(color: { toString: (arg0: number) => any; }) { + var hexadecimal = color.toString(16); + return hexadecimal.length == 1 ? "0" + hexadecimal : hexadecimal; +} + + +export function convertRGBtoHex(red: any, green: any, blue: any) { + return "#" + colorToHex(red) + colorToHex(green) + colorToHex(blue); +} + + +export function pad(num: string | any[], size: number, char: any) { + num = num.toString(); + while (num.length < size) num = char + num; + return num; +}