react-garden
Version:
React + TypeScript + ThreeJS app using Material UI on NextJS, Apollo Client, GraphQL + WordPress REST APIs, for ThreeD web development.. a part of the threed.ai code family.
14 lines (10 loc) • 418 B
text/typescript
/**
The rgba() function helps you to create a rgba color code, it uses the hexToRgb() function
to convert the hex code into rgb for using it inside the rgba color format.
*/
// ThreeD Garden Helper Functions
import hexToRgb from "~/themes/theme-light/functions/hexToRgb"
function rgba(color: string, opacity: number): string {
return `rgba(${hexToRgb(color)}, ${opacity})`
}
export default rgba