Home / Function/ getScanBarColor() — supabase Function Reference

getScanBarColor() — supabase Function Reference

Architecture documentation for the getScanBarColor() function in ExplainVisualizer.utils.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  6bc7fc33_863f_739a_e229_2cb7b664b54c["getScanBarColor()"]
  166f7dd9_5315_f92f_c4ab_1cce98e25b81["ExplainNodeRow()"]
  166f7dd9_5315_f92f_c4ab_1cce98e25b81 -->|calls| 6bc7fc33_863f_739a_e229_2cb7b664b54c
  style 6bc7fc33_863f_739a_e229_2cb7b664b54c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/studio/components/interfaces/ExplainVisualizer/ExplainVisualizer.utils.ts lines 158–177

export function getScanBarColor(operation: string): string {
  const op = operation.toLowerCase()

  // Index scans are green
  if (
    op.includes('index scan') ||
    op.includes('index only scan') ||
    op.includes('bitmap index scan')
  ) {
    return 'bg-brand/20'
  }

  // Sequential scans are yellow
  if (op.includes('seq scan') || op.includes('sequential scan')) {
    return 'bg-warning/20'
  }

  // Default neutral color for other operations
  return 'bg-foreground/[0.06]'
}

Subdomains

Called By

Frequently Asked Questions

What does getScanBarColor() do?
getScanBarColor() is a function in the supabase codebase.
What calls getScanBarColor()?
getScanBarColor() is called by 1 function(s): ExplainNodeRow.

Analyze Your Own Codebase

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

Try Supermodel Free