import type { JSONSupport, JSONSupportMixinProperties } from "../../../core/JSONSupport.js";

export interface ColorModulationProperties extends JSONSupportMixinProperties, Partial<Pick<ColorModulation, "field" | "maxValue" | "minValue">> {}

export default abstract class ColorModulation extends JSONSupport {
  /**
   * {string} Field to use for the color modulation. Commonly modulation
   *                          is used with the `intensity` field.
   */
  accessor field: string;
  /**
   * Field value at which the point color will be left unchanged.
   *
   * @default 255
   */
  accessor maxValue: number;
  /**
   * Field value at which the point color becomes darkest.
   *
   * @default 0
   */
  accessor minValue: number;
}