Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
120
export
function
withAlpha(color: string, opacity: number): string {
121
return
`color-mix(in oklch, ${color} ${opacity * 100}%, transparent)`;
122
}
Callers
4
Hr
Function · 0.90
Home
Function · 0.90
CodeWindow
Function · 0.90
Demo
Function · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected