import type { DarkColorHandler, ModeIndependentColor } from 'roosterjs-editor-types'; /** * Set text color or background color to the given element * @param element The element to set color to * @param color The color to set, it can be a string of color name/value or a ModeIndependentColor object * @param isBackgroundColor Whether set background color or text color * @param isDarkMode Whether current mode is dark mode. @default false * @param shouldAdaptTheFontColor Whether the font color needs to be adapted to be visible in a dark or bright background color. @default false * @param darkColorHandler A dark color handler object. This is now required. * We keep it optional only for backward compatibility. If it is not passed, color will not be set. */ export default function setColor(element: HTMLElement, color: string | ModeIndependentColor, isBackgroundColor: boolean, isDarkMode?: boolean, shouldAdaptTheFontColor?: boolean, darkColorHandler?: DarkColorHandler | null): void;