/** * Copyright 2021 Google LLC * * 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. */ /** * HCT, hue, chroma, and tone. A color system that provides a perceptually * accurate color measurement system that can also accurately render what colors * will appear as in different lighting environments. */ export declare class HCT { private internalHue; private internalChroma; private internalTone; /** * @param hue 0 <= hue < 360; invalid values are corrected. * @param chroma 0 <= chroma < ?; Informally, colorfulness. The color * returned may be lower than the requested chroma. Chroma has a different * maximum for any given hue and tone. * @param tone 0 <= tone <= 100; invalid values are corrected. * @return HCT representation of a color in default viewing conditions. */ static from(hue: number, chroma: number, tone: number): HCT; /** * @param argb ARGB representation of a color. * @return HCT representation of a color in default viewing conditions */ static fromInt(argb: number): HCT; toInt(): number; /** * A number, in degrees, representing ex. red, orange, yellow, etc. * Ranges from 0 <= hue < 360. */ get hue(): number; /** * @param newHue 0 <= newHue < 360; invalid values are corrected. * Chroma may decrease because chroma has a different maximum for any given * hue and tone. */ set hue(newHue: number); get chroma(): number; /** * @param newChroma 0 <= newChroma < ? * Chroma may decrease because chroma has a different maximum for any given * hue and tone. */ set chroma(newChroma: number); /** Lightness. Ranges from 0 to 100. */ get tone(): number; /** * @param newTone 0 <= newTone <= 100; invalid valids are corrected. * Chroma may decrease because chroma has a different maximum for any given * hue and tone. */ set tone(newTone: number); private constructor(); private setInternalState; }