Home / Function/ getColor() — vite Function Reference

getColor() — vite Function Reference

Architecture documentation for the getColor() function in test-utils.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  c457009e_7b0c_b0bd_c1c7_887968a0e3e2["getColor()"]
  c68b21f4_9cd3_3abe_8169_0de2c9650f53["test-utils.ts"]
  c457009e_7b0c_b0bd_c1c7_887968a0e3e2 -->|defined in| c68b21f4_9cd3_3abe_8169_0de2c9650f53
  7dacb29d_bf7e_9683_9334_81d5496b7829["toEl()"]
  c457009e_7b0c_b0bd_c1c7_887968a0e3e2 -->|calls| 7dacb29d_bf7e_9683_9334_81d5496b7829
  400cd374_f087_fa50_bce1_a6f9b8d57470["rgbToHex()"]
  c457009e_7b0c_b0bd_c1c7_887968a0e3e2 -->|calls| 400cd374_f087_fa50_bce1_a6f9b8d57470
  style c457009e_7b0c_b0bd_c1c7_887968a0e3e2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

playground/test-utils.ts lines 109–115

export async function getColor(
  el: string | ElementHandle | Locator,
): Promise<string> {
  el = await toEl(el)
  const rgb = await el.evaluate((el) => getComputedStyle(el as Element).color)
  return hexToNameMap[rgbToHex(rgb)] ?? rgb
}

Domain

Subdomains

Frequently Asked Questions

What does getColor() do?
getColor() is a function in the vite codebase, defined in playground/test-utils.ts.
Where is getColor() defined?
getColor() is defined in playground/test-utils.ts at line 109.
What does getColor() call?
getColor() calls 2 function(s): rgbToHex, toEl.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free