MCPcopy
hub / github.com/epicweb-dev/react-hooks / generateGradient

Function generateGradient

shared/blog-posts.tsx:89–96  ·  view source on GitHub ↗
(seedHex: string)

Source from the content-addressed store, hash-verified

87}
88
89export function generateGradient(seedHex: string): string {
90 const color1 = getColorFromSeed(seedHex, 0, 6)
91 const color2 = getColorFromSeed(seedHex, 6, 6)
92 const degree = seedHex.charCodeAt(0) % 360
93 const gradient = `linear-gradient(${degree}deg, #${color1}, #${color2})`
94
95 return gradient
96}
97
98export function getMatchingPosts(query: string) {
99 const words = query.split(' ').map((w) => w.trim())

Callers 15

MatchingPostsFunction · 0.90
MatchingPostsFunction · 0.90
MatchingPostsFunction · 0.90
MatchingPostsFunction · 0.90
MatchingPostsFunction · 0.90
MatchingPostsFunction · 0.90
MatchingPostsFunction · 0.90
MatchingPostsFunction · 0.90
MatchingPostsFunction · 0.90
MatchingPostsFunction · 0.90
MatchingPostsFunction · 0.90
MatchingPostsFunction · 0.90

Calls 1

getColorFromSeedFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…