CIA Compliance Manager — API Documentation - v1.1.50
    Preparing search index...

    Function getCIAComponentColors

    • Get CIA component color scheme with dark mode support.

      Returns the appropriate color scheme for a CIA component based on the current theme (light or dark mode). Automatically detects dark mode from the document's class list and returns suitable colors.

      Dark Mode Detection: Checks for 'dark' class on document root element.

      Parameters

      • component: "AVAILABILITY" | "INTEGRITY" | "CONFIDENTIALITY"

        CIA component identifier (CONFIDENTIALITY, INTEGRITY, or AVAILABILITY)

      Returns { primary: string; secondary: string }

      Object with primary and secondary colors adjusted for current theme

      // Get colors that adapt to light/dark mode
      const colors = getCIAComponentColors('INTEGRITY');

      // Light mode result:
      // { primary: "#27ae60", secondary: "#d4efdf" }

      // Dark mode result (automatically):
      // { primary: "#00e676", secondary: "#00e67680" (with transparency) }
      // Use in a component that respects theme
      const IntegrityCard = () => {
      const colors = getCIAComponentColors('INTEGRITY');

      return (
      <div style={{
      backgroundColor: colors.secondary,
      borderColor: colors.primary
      }}>
      Integrity Analysis
      </div>
      );
      };