UNPKG

@applicaster/zapp-react-native-ui-components

Version:

Applicaster Zapp React Native ui components for the Quick Brick App

17 lines (13 loc) 374 B
import { map, split, replace, compose, trim } from "ramda"; function colorIsNotTransparent(color) { const layers = compose( map(trim), split(","), replace(")", ""), replace("rgba(", "") )(color); return Number(layers?.[3]) > 0; } export function isValidColor(string) { return string && string !== "transparent" && colorIsNotTransparent(string); }