rgbToHex() — vite Function Reference
Architecture documentation for the rgbToHex() function in test-utils.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD 400cd374_f087_fa50_bce1_a6f9b8d57470["rgbToHex()"] c68b21f4_9cd3_3abe_8169_0de2c9650f53["test-utils.ts"] 400cd374_f087_fa50_bce1_a6f9b8d57470 -->|defined in| c68b21f4_9cd3_3abe_8169_0de2c9650f53 c457009e_7b0c_b0bd_c1c7_887968a0e3e2["getColor()"] c457009e_7b0c_b0bd_c1c7_887968a0e3e2 -->|calls| 400cd374_f087_fa50_bce1_a6f9b8d57470 be8a3ff3_0b5f_03cb_da16_42517372d5e5["getBgColor()"] be8a3ff3_0b5f_03cb_da16_42517372d5e5 -->|calls| 400cd374_f087_fa50_bce1_a6f9b8d57470 49e0df16_c13b_4990_ee9d_ca2e86d8b18e["componentToHex()"] 400cd374_f087_fa50_bce1_a6f9b8d57470 -->|calls| 49e0df16_c13b_4990_ee9d_ca2e86d8b18e style 400cd374_f087_fa50_bce1_a6f9b8d57470 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
playground/test-utils.ts lines 79–91
function rgbToHex(rgb: string): string | undefined {
const match = rgb.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/)
if (match) {
const [_, rs, gs, bs] = match
return (
'#' +
componentToHex(parseInt(rs, 10)) +
componentToHex(parseInt(gs, 10)) +
componentToHex(parseInt(bs, 10))
)
}
return undefined
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does rgbToHex() do?
rgbToHex() is a function in the vite codebase, defined in playground/test-utils.ts.
Where is rgbToHex() defined?
rgbToHex() is defined in playground/test-utils.ts at line 79.
What does rgbToHex() call?
rgbToHex() calls 1 function(s): componentToHex.
What calls rgbToHex()?
rgbToHex() is called by 2 function(s): getBgColor, getColor.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free