{
	"className": [
		{
			"name": "Color",
			"filename": "color.js",
			"description": "Represents a color.",
			"member": [
				{
					"static": false,
					"role": "constructor",
					"description": "Create a new color object.",
					"argument": [
						{
							"name": "colorSpace",
							"optional": false,
							"type": "ColorSpace",
							"description": "Color space id or object"
						},
						{
							"name": "coords",
							"optional": false,
							"type": "Array",
							"description": "Color coordinates in its color space"
						},
						{
							"name": "alpha",
							"optional": true,
							"type": "Number"
						}
					],
					"name": " "
				},
				{
					"name": " ",
					"static": false,
					"role": "constructor",
					"description": "Create a new color object.",
					"argument": [
						{
							"name": "str",
							"optional": false,
							"type": "string",
							"description": "String representation of color. See [`Color.parse()`](#Color.parse) for what's accepted."
						}
					]
				},
				{
					"name": " ",
					"static": false,
					"role": "constructor",
					"description": "Create a new color object.",
					"argument": [
						{
							"name": "color",
							"optional": false,
							"type": "Object",
							"description": "Any object with a `coords` property, and optionally `spaceId` and `alpha`. Another color instance works too, and effectively clones the object."
						}
					]
				},
				{
					"name": "coords",
					"type": "Array",
					"static": false,
					"role": "property",
					"description": "Coordinates of the color in its color space",
					"argument": [
						{
							"optional": false
						}
					]
				},
				{
					"name": "alpha",
					"type": "Number",
					"static": false,
					"role": "property",
					"description": "Alpha transparency. Defaults to 1.",
					"argument": [
						{
							"optional": false
						}
					]
				},
				{
					"name": "space",
					"type": "Object",
					"static": false,
					"role": "accessor",
					"description": "Color space object for the current color.",
					"argument": [
						{
							"optional": false
						}
					]
				},
				{
					"name": "spaceId",
					"type": "String",
					"static": false,
					"role": "accessor",
					"description": "Color space id for the current color, e.g. \"srgb\". Can be used to set the color space, which also transforms the coords accordingly.",
					"argument": [
						{
							"optional": false
						}
					]
				},
				{
					"name": "white",
					"type": "Array",
					"static": false,
					"role": "accessor",
					"description": "White point of the color's color space. Equivalent to `this.space.white`. Defaults to `Color.whites.D50`.",
					"argument": [
						{
							"optional": false
						}
					]
				},
				{
					"name": "luminance",
					"static": false,
					"role": "accessor",
					"description": "Relative luminance.",
					"argument": [
						{
							"optional": false
						}
					],
					"returnType": "Number",
					"returnDescription": "The relative luminance of the color",
					"type": "Number"
				},
				{
					"name": "contrast",
					"static": false,
					"role": "function",
					"description": "Calculates WCAG 2.1 color contrast between this color and another one.",
					"argument": [
						{
							"name": "color2",
							"optional": false,
							"type": "Color"
						}
					],
					"returnType": "Number"
				},
				{
					"name": "contrast",
					"static": true,
					"role": "function",
					"description": "Static version of `color.contrast()`.",
					"argument": [
						{
							"name": "color1",
							"optional": false,
							"type": "Color"
						},
						{
							"name": "color2",
							"optional": false,
							"type": "Color"
						}
					],
					"returnType": "Number"
				},
				{
					"name": "deltaE",
					"static": false,
					"role": "function",
					"description": "DeltaE 1976 distance between the current color and another color. Plugins can add other methods.",
					"argument": [
						{
							"name": "color",
							"optional": false,
							"type": "Color",
							"description": "The color to calculate DeltaE distance from."
						},
						{
							"name": "options",
							"optional": false,
							"type": "Object",
							"description": "Options object"
						},
						{
							"name": "options.method",
							"optional": false,
							"type": "String",
							"description": "Method, e.g. \"76\" or \"2000\""
						}
					],
					"returnType": "Number",
					"returnDescription": "Distance. 2.3 is the \"Just Noticeable Difference\""
				},
				{
					"name": "inGamut",
					"static": false,
					"role": "function",
					"description": "Is the color in gamut for a given color space?",
					"argument": [
						{
							"name": "options",
							"optional": true,
							"type": "Object",
							"description": "Options object."
						},
						{
							"name": "options.space",
							"optional": true,
							"description": "The color space whose gamut we're checking against. Defaults to the current color space."
						}
					],
					"returnType": "Boolean"
				},
				{
					"name": "inGamut",
					"static": true,
					"role": "function",
					"description": "Is the color in gamut for a given color space?",
					"argument": [
						{
							"name": "color",
							"optional": false,
							"type": "Color|Object|String",
							"description": "Color"
						},
						{
							"name": "options",
							"optional": true,
							"type": "Object",
							"description": "Same as color.inGamut()"
						}
					],
					"returnType": "Boolean"
				},
				{
					"name": "toGamut",
					"static": false,
					"role": "function",
					"argument": [
						{
							"name": "options",
							"optional": true,
							"type": "Object",
							"description": "Options object."
						},
						{
							"name": "options.method",
							"optional": true,
							"type": "string",
							"description": "How to force into gamut. If \"clip\", coordinates are just clipped to their reference range (don't do that unless you have a reason, it produces very poor results). If in the form [colorSpaceId].[coordName], that coordinate is reduced until the color is in gamut. Please note that this may produce nonsensical results for certain coordinates (e.g. hue) or infinite loops if reducing the coordinate never brings the color in gamut. Defaults to `\"lch.chroma\"`."
						},
						{
							"name": "options.space",
							"optional": true,
							"type": "ColorSpace",
							"description": "Color space whose gamut we are mapping to. Defaults to the current color space."
						},
						{
							"name": "options.inPlace",
							"optional": true,
							"type": "boolean",
							"description": "If true, modifies the current color instead of returning a new one. Defaults to false."
						}
					],
					"returnType": "Color",
					"description": "Map color to a color that is within a color space's gamut."
				},
				{
					"name": "toGamut",
					"static": true,
					"role": "function",
					"description": "Static version of color.toGamut()",
					"argument": [
						{
							"name": "color",
							"optional": false
						},
						{
							"name": "options",
							"optional": true,
							"type": "Object",
							"description": "Same as color.toGamut()"
						}
					],
					"returnType": "Color"
				},
				{
					"name": "to",
					"static": false,
					"role": "function",
					"description": "Convert the color to another color space and return the result as a new color.\nNote that you don't need this to convert the current color to another color space, just set [Color#spaceId](#Color#spaceId) or [Color#space](#Color#space).",
					"argument": [
						{
							"name": "space",
							"optional": false,
							"description": "Color space to convert to."
						},
						{
							"name": "options",
							"optional": true,
							"type": "Object",
							"description": "Options object."
						},
						{
							"name": "options.inGamut",
							"optional": true,
							"type": "boolean",
							"description": "Whether to also force the coordinates of the new color to be in gamut of its color space"
						}
					],
					"returnType": "Color",
					"returnDescription": "The new color, or the current color, adjusted to fit in the specified gamut."
				},
				{
					"name": "toJSON",
					"static": false,
					"role": "function",
					"argument": [
						{
							"optional": false
						}
					],
					"description": "Returns an object literal that can be serialized to JSON and then parsed and fed back to the Color constructor",
					"returnType": "Object",
					"returnDescription": "Object with `spaceId`, `coords`, and `alpha` properties, so it can be used to recreate the same color."
				},
				{
					"name": "toString",
					"static": false,
					"role": "function",
					"argument": [
						{
							"optional": false,
							"name": "options",
							"type": "Object"
						},
						{
							"name": "options.precision",
							"optional": true,
							"type": "Number",
							"description": "Number of significant digits to round to. Defaults to 5."
						},
						{
							"name": "options.format",
							"optional": false,
							"type": "Function | string",
							"description": "If function, maps all coordinates. If \"%\", formats numbers in the 0-1 range as percentages. Keywords or other values tap into colorspace-specific formats (e.g. \"hex\")."
						},
						{
							"name": "options.commas",
							"optional": false,
							"type": "boolean",
							"description": "Whether to use commas to separate arguments or spaces (and a slash for alpha) [default: false]"
						}
					],
					"description": "Serializes the color to a string",
					"returnType": "string",
					"returnDescription": "Serialized color"
				},
				{
					"name": "chromaticAdaptation",
					"static": true,
					"role": "function",
					"description": "Adapt a XYZ coordinates from one white point to another. Only supports D50 and D65 out of the box. but you can add support for more white points by importing the CAT module.",
					"argument": [
						{
							"name": "W1",
							"optional": false,
							"type": "Array",
							"description": "White point to adapt from"
						},
						{
							"name": "W2",
							"optional": false,
							"type": "Array",
							"description": "White point to adapt to"
						},
						{
							"name": "XYZ",
							"optional": false,
							"type": "Array",
							"description": "XYZ coordinates to adapt"
						}
					]
				},
				{
					"name": "parse",
					"static": true,
					"role": "function",
					"description": "Parse a string as a color. Understands all [CSS Color 4](https://w3.org/TR/css-color-4) functions. Uses the DOM if present to parse hex colors and color names, so that will not not available in non-DOM environments such as Node.js.",
					"argument": [
						{
							"name": "str",
							"optional": false,
							"type": "string",
							"description": "String to parse as a color. "
						}
					],
					"returnType": "Object",
					"returnDescription": "An object with properties `spaceId`, `coords`, `alpha` that can be then passed to the `Color` constructor to create a new color."
				},
				{
					"name": "parseFunction",
					"static": true,
					"role": "function",
					"argument": [
						{
							"optional": false,
							"name": "str",
							"type": "string",
							"description": "String to parse"
						}
					],
					"description": "Parse a functional notation and return an object. Used internally by [`Color.parse()`](#Color.parse)",
					"returnType": "Object",
					"returnDescription": "An object with `name` (function name), `args` (Array) and `rawArgs` (string) properties."
				},
				{
					"name": "convert",
					"static": true,
					"role": "function",
					"description": "One-off convert coordinates between color spaces.",
					"argument": [
						{
							"optional": false,
							"name": "coords",
							"type": "Array",
							"description": "Coordinates to convert."
						},
						{
							"name": "fromSpace",
							"optional": false,
							"type": "ColorSpace",
							"description": "Color space to convert from."
						},
						{
							"name": "toSpace",
							"optional": false,
							"type": "ColorSpace",
							"description": "Color space to convert to."
						}
					],
					"returnType": "Array",
					"returnDescription": "Converted coordinates"
				},
				{
					"name": "get",
					"static": true,
					"role": "function",
					"description": "Get a Color object from the argument passed. Basically gets us the same result as `new Color(color)` but doesn't clone an existing color object. Mainly used internally, by functions that accept color arguments.",
					"argument": [
						{
							"optional": false,
							"name": "color",
							"type": "Color | string | Object"
						}
					],
					"returnType": "Color"
				},
				{
					"name": "space",
					"static": true,
					"role": "function",
					"description": "Return a color space object from an id or color space object. Mainly used internally, so that functions can easily accept either.",
					"argument": [
						{
							"optional": false,
							"name": "spaceOrId",
							"type": "Object | string"
						}
					]
				},
				{
					"name": "defineSpace",
					"static": true,
					"role": "function",
					"description": "Define a new color space",
					"argument": [
						{
							"optional": false,
							"name": "space",
							"type": "Object",
							"description": "Object with color space details."
						}
					]
				},
				{
					"name": "spaces",
					"type": "Object",
					"static": true,
					"role": "property",
					"description": "All registered color spaces",
					"argument": [
						{
							"optional": false
						}
					]
				},
				{
					"name": "hooks",
					"type": "Hooks",
					"static": true,
					"role": "property",
					"description": "[Hooks](#Hooks) object to facilitate creating and using extension points in the code. ",
					"argument": [
						{
							"optional": false
						}
					]
				},
				{
					"name": "whites",
					"type": "Object",
					"static": true,
					"role": "property",
					"description": "All registered white points.",
					"argument": [
						{
							"optional": false
						}
					]
				}
			]
		},
		{
			"name": "Color",
			"filename": "interpolation.js",
			"description": "Interpolation-related functionality",
			"member": [
				{
					"name": "mix",
					"static": false,
					"role": "function",
					"description": "Return an intermediate color between two colors",
					"argument": [
						{
							"name": "color",
							"optional": false,
							"type": "Color"
						},
						{
							"name": "p",
							"optional": true,
							"type": "Number"
						},
						{
							"name": "options",
							"optional": true,
							"type": "Object",
							"description": "Options object. Options are the same as `color.range()`."
						}
					],
					"returnType": "Color"
				},
				{
					"name": "mix",
					"static": true,
					"role": "function",
					"description": "Return an intermediate color between two colors",
					"argument": [
						{
							"name": "color1",
							"optional": false,
							"type": "Color"
						},
						{
							"name": "color2",
							"optional": false,
							"type": "Color"
						},
						{
							"name": "p",
							"optional": true,
							"type": "Number"
						},
						{
							"name": "options",
							"optional": true,
							"type": "Object",
							"description": "Options object. Options are the same as `color.mix()`."
						}
					],
					"returnType": "Color"
				},
				{
					"name": "range",
					"static": false,
					"role": "function",
					"description": "Interpolate to another color and return a function that takes a 0-1 percentage and returns a color in the range.",
					"argument": [
						{
							"name": "color",
							"optional": false,
							"type": "Color",
							"description": "Color to interpolate to."
						},
						{
							"name": "options",
							"optional": true,
							"type": "Object",
							"description": "Options object."
						},
						{
							"name": "options.space",
							"optional": true,
							"type": "ColorSpace",
							"description": "The color space to interpolate in."
						},
						{
							"name": "options.outputSpace",
							"optional": true,
							"type": "ColorSpace",
							"description": "The color space of the output. Defaults to the current color's color space."
						},
						{
							"name": "options.progression",
							"optional": true,
							"type": "Function",
							"description": "Function that takes a 0-1 parameter and returns a 0-1 number to control the progression and allow for non-linear interpolation. E.g. for a 2.2 gamma use `x => x ** 2.2`."
						},
						{
							"name": "options.premultiplied",
							"optional": true,
							"type": "boolean",
							"description": "If true, interpolate on premultiplied values. Defaults to false."
						}
					],
					"returnType": "Function",
					"returnDescription": "Function that takes a 0-1 parameter and returns a color in that place in the range"
				},
				{
					"name": "range",
					"static": true,
					"role": "function",
					"description": "Interpolate to another color and return a function that takes a 0-1 percentage and returns a color in the range.",
					"argument": [
						{
							"name": "color",
							"optional": false,
							"type": "Color",
							"description": "Color to interpolate to."
						},
						{
							"name": "options",
							"optional": true,
							"type": "Object",
							"description": "Options object. Same as `color.range()`."
						}
					],
					"returnType": "Function",
					"returnDescription": "Function that takes a 0-1 parameter and returns a color in that place in the range"
				},
				{
					"name": "steps",
					"static": false,
					"role": "function",
					"description": "Interpolate to another color and return an array of colors",
					"argument": [
						{
							"name": "color",
							"optional": false,
							"type": "Color"
						},
						{
							"name": "options",
							"optional": true,
							"type": "Object",
							"description": "Options object. In addition to the options listed here, it also supports all the options of `color.range()`."
						},
						{
							"name": "options.space",
							"optional": true,
							"type": "ColorSpace",
							"description": "The color space to interpolate in."
						},
						{
							"name": "options.outputSpace",
							"optional": true,
							"type": "ColorSpace",
							"description": "The color space of the output. Defaults to the current color's color space."
						},
						{
							"name": "options.maxDeltaE",
							"optional": true,
							"type": "Number",
							"description": "Max deltaE between consecutive steps."
						},
						{
							"name": "options.steps",
							"optional": true,
							"type": "Number",
							"description": "Number of steps. Note that if the `maxDeltaE` parameter is also provided, the returned steps may be more."
						},
						{
							"name": "options.maxSteps",
							"optional": true,
							"type": "Number",
							"description": "Maximum number of steps to return. This only makes sense if `maxDeltaE` is used."
						}
					],
					"returnType": "Array",
					"returnDescription": "Array of colors"
				},
				{
					"name": "steps",
					"static": true,
					"role": "function",
					"description": "Interpolate to another color and return an array of colors",
					"argument": [
						{
							"name": "color1",
							"optional": false,
							"type": "Color"
						},
						{
							"name": "color2",
							"optional": false,
							"type": "Color"
						},
						{
							"name": "options",
							"optional": true,
							"type": "Object",
							"description": "Same as `color.steps()`."
						}
					],
					"returnType": "Array",
					"returnDescription": "Array of colors"
				},
				{
					"name": "steps",
					"static": true,
					"role": "function",
					"description": "Interpolate to another color and return an array of colors",
					"argument": [
						{
							"name": "range",
							"optional": false,
							"type": "Function",
							"description": "Function returned by `color.range()`."
						},
						{
							"name": "options",
							"optional": true,
							"type": "Object",
							"description": "Same as `color.steps()`."
						}
					],
					"returnType": "Array",
					"returnDescription": "Array of colors"
				}
			]
		},
		{
			"name": "util",
			"filename": "util.js",
			"description": "Collection of utility functions. Available on `Color.util`, or as separate exports.",
			"member": [
				{
					"name": "isString",
					"static": true,
					"role": "function",
					"description": "Check if a value is a string (including a String object)",
					"argument": [
						{
							"name": "str",
							"optional": false,
							"description": "Value to check"
						}
					],
					"returnType": "boolean",
					"returnDescription": "true if value is a string, false otherwise."
				},
				{
					"name": "type",
					"static": true,
					"role": "function",
					"description": "Determine the internal JavaScript [[Class]] of an object.",
					"argument": [
						{
							"name": "o",
							"optional": false,
							"description": "Value to check"
						}
					],
					"returnType": "string",
					"returnDescription": "The internal [[Class]] of o, lowercased."
				},
				{
					"name": "extend",
					"static": true,
					"role": "function",
					"description": "Like [Object.assign()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) but copies property descriptors (including symbols)",
					"argument": [
						{
							"name": "target",
							"optional": false,
							"type": "Object",
							"description": " Object to copy to"
						},
						{
							"name": "...sources",
							"optional": false,
							"type": "...Object",
							"description": "Object(s) to copy from"
						}
					],
					"returnType": "Object",
					"returnDescription": "target (which has now acquired new properties)"
				},
				{
					"name": "copyDescriptor",
					"static": true,
					"role": "function",
					"description": "Copy a single descriptor from one object to another.",
					"argument": [
						{
							"name": "target",
							"optional": false,
							"type": "Object",
							"description": "Object to copy to"
						},
						{
							"name": "source",
							"optional": false,
							"type": "Object",
							"description": "Object to copy from"
						},
						{
							"name": "property",
							"optional": false,
							"type": "string",
							"description": "Name of property"
						}
					]
				},
				{
					"name": "capitalize",
					"static": true,
					"role": "function",
					"description": "Uppercase the first letter of a string",
					"argument": [
						{
							"name": "str",
							"optional": false,
							"type": "string",
							"description": "String to capitalize"
						}
					],
					"returnDescription": "Capitalized string",
					"returnType": "string"
				},
				{
					"name": "toPrecision",
					"static": false,
					"role": "function",
					"description": "Round a number to a certain number of significant digits based on a range.",
					"argument": [
						{
							"name": "n",
							"optional": false,
							"type": "Number",
							"description": "The number to round"
						},
						{
							"name": "precision",
							"optional": false,
							"type": "Number",
							"description": "Number of significant digits"
						},
						{
							"name": "range",
							"optional": true,
							"type": "Array",
							"description": "Range to base number of decimals on"
						}
					],
					"returnType": "Number"
				}
			]
		},
		{
			"name": "util",
			"filename": "multiply-matrices.js",
			"member": [
				{
					"name": "multiplyMatrices",
					"static": true,
					"role": "function",
					"description": "Multiply two matrices or vectors. Matrices are specified as multi-dimensional arrays, where every `A[i][j]` is the i-th column and j-th row. Does not do any dimension checking; it's a \"garbage in, garbage out\" function.",
					"argument": [
						{
							"name": "A",
							"optional": false,
							"type": "Array",
							"description": "First matrix"
						},
						{
							"name": "B",
							"optional": false,
							"type": "Array",
							"description": "Second matrix"
						}
					],
					"returnType": "Array",
					"returnDescription": "Result"
				}
			]
		},
		{
			"name": "Hooks",
			"filename": "hooks.js",
			"description": "**This is for plugin authors. If you're not interested in writing plugins for Color.js, you can skip this.**\nHooks afford extensibility far beyond what can be achieved by overriding properties and methods, or using functions. Hooks allow plugin authors to change how Color.js’ internal code works, by adding custom callbacks to predefined points in the execution.\nYou can find available hooks by searching the source code for `Color.hooks.run(` or `_.hooks.run(` in color.js.\nIf you need a hook that is not present, we typically accept pull requests for new hooks pretty easily!",
			"member": [
				{
					"name": "add",
					"static": false,
					"role": "function",
					"description": "Schedule a callback to be executed at a certain point in the source code.",
					"argument": [
						{
							"name": "name",
							"optional": false,
							"description": "Name of hook to add the callback to."
						},
						{
							"name": "callback",
							"optional": false,
							"description": "Code to run at the given hook. The callback will be called with (typically) the same context as the calling code, and a single object as its only argument (typically called `env`) with writeable properties for various aspects of the calling environment."
						},
						{
							"name": "first",
							"optional": true,
							"type": "boolean",
							"description": "Whether to prepend instead of append this callback to any existing callbacks on the same hook. Defaults to false."
						}
					]
				},
				{
					"name": "run",
					"static": false,
					"role": "function",
					"description": "Creates a hook for plugin authors to be able to add code to.",
					"argument": [
						{
							"name": "name",
							"optional": false,
							"type": "string",
							"description": "Name of the hook to create. By convention, it's in the form `[class name]-[function name]-[location in function body]`. Class name can be omitted if it's in `color.js`. Location in function body is typically things like \"start\", \"end\", or e.g. \"before-conversion\", \"after-init\" etc."
						},
						{
							"name": "env",
							"optional": false,
							"type": "Object",
							"description": "Object with properties to be passed to the hook's callback. This will also be used as the function context, unless it has a `context` property, then that is used as the function context."
						}
					]
				}
			]
		}
	]
}
