/** * 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. */ /** * Functions for blending in HCT and CAM16. */ export declare class Blend { /** * @param designColor ARGB representation of an arbitrary color. * @param keyColor ARGB representation of the main theme color. * @return The design color with a hue shifted towards the system's color, * a slightly warmer/cooler variant of the design color's hue. */ static harmonize(designColor: number, sourceColor: number): number; /** * Blends hue from one color into another. The chroma and tone of the original * color are maintained. * * @param from ARGB representation of color * @param to ARGB representation of color * @param amount how much blending to perform; 0.0 >= and <= 1.0 * @return from, with a hue blended towards to. Chroma and tone are constant. */ static hctHue(from: number, to: number, amount: number): number; /** * Blend in CAM16-UCS space. * * @param from ARGB representation of color * @param to ARGB representation of color * @param amount how much blending to perform; 0.0 >= and <= 1.0 * @return from, blended towards to. Hue, chroma, and tone will change. */ static cam16ucs(from: number, to: number, amount: number): number; /** * Sign of direction change needed to travel from one angle to another. * * @param from The angle travel starts from, in degrees. * @param to The angle travel ends at, in degrees. * @return -1 if decreasing from leads to the shortest travel distance, 1 if * increasing from leads to the shortest travel distance. */ private static rotationDirection; }