@flexnative/theme-context
Version:
React ThemeContext
41 lines (40 loc) • 1.65 kB
TypeScript
import { ColorSchemeName, ColorValue } from "react-native";
/**
* Generates a hover color based on the color scheme.
* For dark mode, it lightens the color. For light mode, it darkens the color.
*
* @param baseColor - The starting color string.
* @param modification - The current color scheme ('light', 'dark', or null).
* @returns The modified hover color string.
*/
export declare const applyHoverColor: (baseColor: string, modification: ColorSchemeName) => string;
/**
* Generates an active (pressed) color based on the color scheme.
* For dark mode, it lightens the color. For light mode, it darkens the color.
*
* @param baseColor - The starting color string or ColorValue.
* @param modification - The current color scheme ('light', 'dark', or null).
* @returns The modified active color string.
*/
export declare const applyActiveColor: (baseColor: ColorValue | string, modification: ColorSchemeName) => string;
/**
* Generates a subtle color by lightening the base color.
*
* @param baseColor - The starting color string.
* @returns The lightened subtle color.
*/
export declare const subtleColor: (baseColor: string) => string;
/**
* Generates a subtle hover color by lightening the base color.
*
* @param baseColor - The starting color string.
* @returns The lightened subtle hover color.
*/
export declare const subtleHoverColor: (baseColor: string) => string;
/**
* Generates a subtle active (pressed) color by lightening the base color.
*
* @param baseColor - The starting color string.
* @returns The lightened subtle active color.
*/
export declare const subtleActiveColor: (baseColor: string) => string;