MCPcopy Create free account
hub / github.com/css-hooks/css-hooks / withAlpha

Function withAlpha

site/src/css.ts:120–122  ·  view source on GitHub ↗
(color: string, opacity: number)

Source from the content-addressed store, hash-verified

118}
119
120export function withAlpha(color: string, opacity: number): string {
121 return `color-mix(in oklch, ${color} ${opacity * 100}%, transparent)`;
122}

Callers 4

HrFunction · 0.90
HomeFunction · 0.90
CodeWindowFunction · 0.90
DemoFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected