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) • 342 B
text/typescript
/**
The hexToRgb() function helps you to change the hex color code to rgb
using chroma-js library.
*/
// chroma-js is a library for all kinds of color conversions and color scales.
import chroma from "chroma-js"
function hexToRgb(color: string): string {
return chroma(color).rgb().join(", ")
}
export default hexToRgb