MCPcopy Create free account
hub / github.com/anomalyco/opencode / hexToOklch

Function hexToOklch

packages/ui/src/theme/color.ts:98–101  ·  view source on GitHub ↗
(hex: HexColor)

Source from the content-addressed store, hash-verified

96}
97
98export function hexToOklch(hex: HexColor): OklchColor {
99 const { r, g, b } = hexToRgb(hex)
100 return rgbToOklch(r, g, b)
101}
102
103export function fitOklch(oklch: OklchColor): OklchColor {
104 const base = {

Callers 11

resolveThemeVariantFunction · 0.90
contentFunction · 0.90
modifiedFunction · 0.90
mapV2ForegroundFunction · 0.90
generateV2HueScaleFunction · 0.90
generateScaleFunction · 0.85
generateNeutralScaleFunction · 0.85
mixColorsFunction · 0.85
shiftFunction · 0.85
lightenFunction · 0.85
darkenFunction · 0.85

Calls 2

rgbToOklchFunction · 0.85
hexToRgbFunction · 0.70

Tested by

no test coverage detected