27 lines
743 B
TypeScript
27 lines
743 B
TypeScript
import type { BaseLayer } from "./base-layer";
|
|
|
|
export type ColorAdjustment = {
|
|
brightness: number;
|
|
contrast: number;
|
|
saturation: number;
|
|
colorBalance: { red: number; green: number; blue: number };
|
|
};
|
|
|
|
/**
|
|
* A non-destructive adjustment affecting pixels already composited beneath it
|
|
* on its artboard. Adjustment layers are top-level artboard nodes so live WebGL
|
|
* and exported PNG compositing have identical scope. Transform and masks are
|
|
* intentionally unsupported.
|
|
*/
|
|
export type AdjustmentLayer = BaseLayer & {
|
|
type: "adjustment";
|
|
adjustment: ColorAdjustment;
|
|
};
|
|
|
|
export const neutralColorAdjustment: ColorAdjustment = {
|
|
brightness: 0,
|
|
contrast: 0,
|
|
saturation: 0,
|
|
colorBalance: { red: 0, green: 0, blue: 0 },
|
|
};
|