Files
lnreader/src/utils/getLoadingColors.ts
T
Rajarshee Chatterjee c6c41a2d1b Cleanup
2023-02-17 22:59:20 +05:30

17 lines
585 B
TypeScript

import { ThemeColors } from '@theme/types';
import color from 'color';
const getLoadingColors = (theme: ThemeColors) => {
const highlightColor = color(theme.primary).alpha(0.08).string();
let backgroundColor = theme.surface;
backgroundColor = color(backgroundColor).isDark()
? color(backgroundColor).luminosity() !== 0
? color(backgroundColor).lighten(0.1).toString()
: color(backgroundColor).negate().darken(0.98).toString()
: color(backgroundColor).darken(0.04).toString();
return [highlightColor, backgroundColor];
};
export default getLoadingColors;