import { DEFAULT , defmulti } from "@thi.ng/defmulti/defmulti" ; import type { MaybeColor } from "./api.js" ; import { rgb } from "./rgb/rgb.js" ; import { luminanceAbgr32 , luminanceArgb32 , luminanceRgb , luminanceSrgb , } from "./luminance-rgb.js" ; import { __dispatch0 } from "./internal/dispatch.js" ; remarks export const luminance = defmulti < MaybeColor , number > ( < any > __dispatch0 , { lch : "lab" , oklab : "lab" , ycc : "lab" , xyy : "hcy" } , { argb32 : < any > luminanceArgb32 , abgr32 : < any > luminanceAbgr32 , hcy : ( x ) => x [ 2 ] , lab : ( x ) => x [ 0 ] , rgb : < any > luminanceRgb , srgb : < any > luminanceSrgb , xyz : ( x ) => x [ 1 ] , [ DEFAULT ] : ( x ) => luminanceRgb ( rgb ( x ) ) , } ) ;