10  Visual Style Guide

Standards for Diagrams, Colors, and Formatting

In 60 Seconds

This visual style guide defines the standards for all IoTClass diagrams, colors, and formatting to ensure consistency across 1,600+ chapters. The IEEE color palette – Navy (#2C3E50), Teal (#16A085), Orange (#E67E22), and Gray (#7F8C8D) – serves as the foundation for all visual elements, with concept-type colors extending the palette for specific diagram categories. All images must include WCAG 2.1-compliant alt text, and diagrams should use the standardized base theme template to maintain automatic compliance with project standards.

Reference usability can be estimated by lookup coverage:

\[ U = \frac{N_{\text{resolved-lookups}}}{N_{\text{total-lookups}}} \]

Worked example: If learners perform 220 glossary lookups and 198 are resolved without leaving the section, usability is \(198/220=90\%\). Improving cross-references and examples should push this ratio higher.

10.1 Learning Objectives

  • Apply the IEEE color palette (Navy, Teal, Orange, Gray) and concept-type colours consistently across diagrams and content
  • Compose descriptive alt text for images following WCAG 2.1 accessibility requirements
  • Select the correct callout types (note, tip, warning, important) and formatting conventions for tables, code blocks, and headings
  • Configure diagram themes using the standardised base theme template
Key Takeaway

In one sentence: Consistent visual styling using the IEEE color palette and standardized diagram themes creates a professional, accessible learning experience that helps students recognize patterns across chapters.

Remember this rule: Copy the theme initialization template from the Quick Reference Card section when creating new diagrams to ensure automatic compliance with project standards.

10.2 Overview

This guide documents the visual standards for IoTClass content, ensuring consistency across all chapters, diagrams, and interactive tools. Following these standards creates a cohesive learning experience and maintains accessibility compliance (WCAG 2.1).

Why consistency matters:

  • Recognition: Students learn visual patterns, making navigation intuitive
  • Accessibility: Consistent color usage supports readers with color vision differences
  • Professionalism: Unified styling reflects academic quality
  • Maintainability: Standards make content updates predictable

10.3 IEEE Base Colors

The foundational color palette follows IEEE standards for technical documentation.

Color Hex Code RGB Usage
Navy #2C3E50 rgb(44, 62, 80) Primary text, headers, main diagram elements
Teal #16A085 rgb(22, 160, 133) Secondary elements, accents, success states
Orange #E67E22 rgb(230, 126, 34) Highlights, warnings, attention elements
Gray #7F8C8D rgb(127, 140, 141) Neutral elements, borders, disabled states

10.3.1 Color Swatches

Navy
#2C3E50

Teal
#16A085

Orange
#E67E22

Gray
#7F8C8D

10.3.2 Interactive Color Contrast Checker

Use this tool to verify if your color combinations meet WCAG 2.1 AA accessibility standards (4.5:1 ratio for normal text).


10.4 Concept Type Colors

Each concept type has a dedicated color scheme for visual consistency across diagrams, callouts, and interactive tools.

10.4.1 Color Reference Table

Concept Type Primary Secondary Border Light Background Use For
Protocol #1B4F72 #2874A6 #1A5276 #D4E6F1 MQTT, CoAP, HTTP, LoRaWAN, Zigbee
Hardware #7B8A8B #95A5A6 #707B7C #E5E8E8 Sensors, microcontrollers, actuators
Data #16A085 #1ABC9C #138D75 #D1F2EB JSON, CBOR, payloads, schemas
Reliability #E67E22 #F39C12 #CA6F1E #FDEBD0 QoS, retries, buffering, guarantees
Security #6B2D5B #8E44AD #5B2C6F #E8DAEF TLS, authentication, encryption
Edge #27AE60 #2ECC71 #229954 #D5F5E3 Edge computing, gateways, fog
Cloud #3498DB #5DADE2 #2E86C1 #D6EAF8 Cloud services, backend, storage
Time #D4A500 #F1C40F #B7950B #FCF3CF Timestamps, sync, NTP

10.4.2 Concept Color Swatches

Protocol
#1B4F72

Hardware
#7B8A8B

Data
#16A085

Reliability
#E67E22

Security
#6B2D5B

Edge
#27AE60

Cloud
#3498DB

Time
#D4A500


10.5 Diagram Standards

10.5.1 Base Theme Configuration

The following theme configuration was historically used for Mermaid diagrams (now migrated to modern SVGs). This reference is maintained for understanding the color choices in existing diagrams:

%%{init: {
  'theme': 'base',
  'themeVariables': {
    'primaryColor': '#2C3E50',
    'primaryTextColor': '#FFFFFF',
    'primaryBorderColor': '#1A252F',
    'lineColor': '#7F8C8D',
    'secondaryColor': '#16A085',
    'tertiaryColor': '#E8F6F3',
    'background': '#FFFFFF',
    'mainBkg': '#FFFFFF',
    'nodeBorder': '#2C3E50',
    'clusterBkg': '#F8F9FA',
    'clusterBorder': '#DEE2E6',
    'titleColor': '#2C3E50'
  }
}}%%

10.5.2 Flowchart Example

Flowchart showing visual style guide process: Initialize theme with IEEE base colors (Navy #2C3E50, Teal #16A085), select concept-specific colors from palette (Protocol blue, Security purple, Edge green, etc.), apply to diagram elements, verify accessibility standards (WCAG 2.1 contrast ratios), and publish. Arrows flow top-to-bottom with decision nodes for color selection and validation checks.

10.5.3 Sequence Diagram Example

Sequence diagram showing interaction flow between three entities: User, Application, and Database. User initiates request to Application, Application queries Database with SELECT statement, Database returns result set, Application processes data and responds to User with formatted output. Uses base theme colors with navy actors, teal secondary elements, and gray message arrows.

Sequence diagram example

10.5.4 State Diagram Example

State diagram showing device lifecycle states: Idle (initial state), Active (processing data), Transmitting (sending data), and Error (fault condition). Transitions include: Idle to Active on sensor trigger, Active to Transmitting when data ready, Transmitting back to Idle on success, or any state to Error on fault. Error state has timeout transition back to Idle. Uses base theme with navy states, teal transitions, and orange error highlighting.

State diagram example

10.5.5 Concept-Specific Themes

When a diagram focuses on a single concept type, use the concept-specific theme:

Protocol Theme Example:

MQTT publish-subscribe architecture diagram showing IoT Device (publisher) sending temperature data through MQTT Broker to multiple subscribers (Mobile App, Cloud Service, Dashboard). Message flow: Device publishes to topic 'sensors/temperature', Broker receives and forwards to all subscribers of that topic. Uses protocol blue (#1B4F72) for MQTT Broker and message paths, teal for IoT devices, cloud blue for backend services.

MQTT protocol diagram

Security Theme Example:

Security authentication flowchart showing login process: Start with user credentials input, validate credentials (decision), if invalid return to input with error message, if valid check two-factor authentication enabled (decision), if yes send verification code and validate it, if no or 2FA passes then grant access and create session token, finally redirect to dashboard. Uses security purple (#6B2D5B) for authentication nodes, reliability orange (#E67E22) for validation decision points, and edge green (#27AE60) for successful outcomes.

Security authentication flowchart

10.6 Callout Standards

Callouts provide contextual information with consistent visual styling.

10.6.1 Types and Usage

Callout Type Icon Use For Color Accent
note Info circle Key information, clarifications Blue
tip Lightbulb Best practices, recommendations Green
warning Triangle Pitfalls, cautions, common mistakes Orange
important Exclamation Critical information, must-know Red
caution Shield Security concerns, data safety Yellow

10.6.2 Formatted Examples

Key Concept

This is a note callout used for important information that students should pay attention to. Use notes to highlight key concepts, definitions, or essential context.

Best Practice

This is a tip callout for recommendations and best practices. Use tips to share practical advice, shortcuts, or optimal approaches that help students succeed.

Common Mistake

This is a warning callout for pitfalls and cautions. Use warnings to prevent common errors, highlight potential issues, or flag deprecated approaches.

Critical Information

This is an important callout for must-know information. Use this sparingly for critical facts that students absolutely must understand.

10.6.3 Collapsible Callouts

Use collapsible callouts for supplementary content that should not interrupt the main flow:

A protocol is simply an agreed-upon way for devices to communicate. Think of it like a language - if two people speak the same language, they can understand each other. If two devices use the same protocol, they can exchange information.

Common IoT protocols include:

  • MQTT: Lightweight messaging for constrained devices
  • HTTP: The same protocol web browsers use
  • CoAP: Like HTTP but optimized for small devices

10.6.4 Callout Do’s and Don’ts

Do:

  • Use appropriate callout type for the content
  • Keep callout titles concise (3-5 words)
  • Use collapsible callouts for optional deep dives
  • Include actionable information

Don’t:

  • Overuse callouts (max 2-3 per section)
  • Put essential content only in callouts
  • Use warning for non-critical information
  • Nest callouts within callouts

10.7 Image Standards

10.7.1 Alt Text Requirements (WCAG 2.1)

Every image must include descriptive alt text for accessibility:

![Diagram showing three-tier IoT architecture with edge, fog, and cloud layers](images/architecture-modern-20260212.svg){fig-alt="Three-tier IoT architecture diagram: Bottom layer shows IoT devices and sensors connected to edge gateways. Middle layer depicts fog computing nodes for local processing. Top layer represents cloud services for storage, analytics, and applications. Arrows show bidirectional data flow between all layers."}

Alt text guidelines:

  • Describe what the image shows, not just what it is
  • Include key information conveyed by the image
  • Keep descriptions concise but complete (50-150 words)
  • Don’t start with “Image of” or “Picture showing”

10.7.2 Image Format Selection

Format Use For Advantages
SVG Diagrams, icons, logos Scalable, small size, editable
PNG Screenshots, diagrams with text Lossless, transparency support
JPEG Photographs, complex images Small file size for photos
WebP Web-optimized versions Best compression, wide support

10.7.3 Image Sizing

  • Full-width diagrams: Use default (100% container width)
  • Inline figures: Specify width as percentage (e.g., width="60%")
  • Side-by-side images: Use grid layout with columns

Example grid layout:

::: {.grid}
::: {.g-col-6}
![First image](image1.png){fig-alt="Example placeholder image for style guide demonstration"}
:::
::: {.g-col-6}
![Second image](image2.png){fig-alt="Example placeholder image for style guide demonstration"}
:::
:::

10.8 Code Block Standards

10.8.1 Language Highlighting

Always specify the language for syntax highlighting:

```python
# Python code with proper highlighting
def read_sensor():
    return sensor.get_value()
```

Supported languages: python, javascript, bash, json, yaml, c, cpp, java, sql, html, css, markdown

10.8.2 Code Block Best Practices

Good Example:

# Read temperature from DHT22 sensor
import board
import adafruit_dht

# Initialize sensor on GPIO pin 4
dht = adafruit_dht.DHT22(board.D4)

def read_temperature():
    """Read temperature in Celsius."""
    try:
        return dht.temperature
    except RuntimeError as e:
        # Sensor occasionally fails, retry
        print(f"Sensor error: {e}")
        return None

Avoid:

# Missing language specification
def bad_example():
    pass

10.8.3 Showing Wrong vs. Correct Code

Use callouts to contrast incorrect and correct approaches:

Wrong Approach
# Don't store credentials in code
password = "my_secret_password"
Correct Approach
# Load credentials from environment
import os
password = os.environ.get("DEVICE_PASSWORD")

10.9 Table Standards

10.9.1 Basic Table Format

Column 1 Column 2 Column 3
Data 1 Data 2 Data 3
Data 4 Data 5 Data 6

10.9.2 Table Guidelines

  • Use consistent column alignment
  • Keep table width readable (max 5-6 columns)
  • Include header row with bold formatting
  • Use code formatting for technical values (value)

10.9.3 Comparison Table Example

Feature MQTT CoAP HTTP
Transport TCP UDP TCP
Message Size Small Very Small Large
Power Usage Low Very Low High
Use Case Pub/Sub Request/Response Web APIs

10.10 Interactive Tool Standards

10.10.1 Input Layout Consistency

All interactive tools should follow consistent input patterns:

  1. Labels above inputs (not inline)
  2. Help text below inputs in smaller font
  3. Logical grouping of related inputs
  4. Clear action buttons with descriptive labels

10.10.2 Responsive Design Requirements

  • Mobile-first: Design for 320px width minimum
  • Touch targets: Minimum 44x44px for buttons/controls
  • Readable text: Minimum 16px font for inputs
  • Scrollable results: Long outputs should scroll, not overflow

10.10.3 Results Display

  • Use consistent formatting for calculated values
  • Show units clearly (e.g., “Power: 3.2 mW”)
  • Provide visual feedback for valid/invalid states
  • Include “Reset” functionality for complex tools

10.10.4 Example Tool Structure (OJS)

```{ojs}
//| echo: false

viewof parameter = Inputs.range([0, 100], {
  label: "Parameter Name",
  value: 50,
  step: 1
})

result = {
  // Calculation logic
  return parameter * 2;
}
```

**Result:** ${result} units

10.11 Typography Standards

10.11.1 Heading Hierarchy

  • H1 (#): Page title only (one per page)
  • H2 (##): Major sections
  • H3 (###): Subsections
  • H4 (####): Minor subsections (use sparingly)

10.11.2 Text Formatting

Format Markdown Use For
Bold **text** Key terms, emphasis
Italic *text* Definitions, foreign terms
Code `code` Technical terms, commands, values
Example link [text](url) Cross-references, external resources

10.11.3 Lists

Bullet lists for unordered items:

  • First item
  • Second item
  • Third item

Numbered lists for sequential steps:

  1. First step
  2. Second step
  3. Third step

Definition lists for term-definition pairs:

Term
Definition of the term
Another Term
Definition of another term

10.12 Accessibility Checklist

Before publishing content, verify:


10.13 Quick Reference Card

10.13.1 Diagram Theme Reference

For reference, the theme template for standard diagrams (historical Mermaid configuration, now using modern SVGs):

%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#2C3E50', 'primaryTextColor': '#FFFFFF', 'lineColor': '#7F8C8D', 'secondaryColor': '#16A085'}}}%%

10.13.2 Color Quick Reference

Purpose Hex Code
Primary/Navy #2C3E50
Accent/Teal #16A085
Warning/Orange #E67E22
Neutral/Gray #7F8C8D
Protocol/Blue #1B4F72
Security/Purple #6B2D5B
Edge/Green #27AE60
Cloud/Sky #3498DB

10.13.3 Callout Quick Reference


::: {.callout-note}
## Title
Content
:::

::: {.callout-tip collapse="true"}
## Collapsible Title
Hidden content
:::

10.15 Concept Relationships

How Visual Standards Connect to Learning

Design Principles → User Experience:

  • IEEE color palette (Navy, Teal, Orange, Gray) provides consistent visual hierarchy
  • Concept-type colors (Protocol Blue, Security Purple, etc.) help students recognize patterns across chapters
  • Accessibility standards (WCAG 2.1) ensure all learners can access content

Callout Types → Cognitive Load:

  • Note (blue) → Factual information (low cognitive demand)
  • Tip (green) → Actionable guidance (medium demand, requires application)
  • Warning (orange) → Error prevention (high attention, critical thinking)
  • Important (red) → Must-know information (highest priority)

Prototype Fidelity → Testing Goals:

  • Paper (concept validation) → Breadboard (technical) → Wizard of Oz (interaction) → Functional (complete)
  • Each level gates the next—failing cheap prevents expensive mistakes

Visual Consistency → Knowledge Transfer:

  • Students see Protocol Blue (#1B4F72) → brain recognizes “this is about MQTT/CoAP/HTTP”
  • Mermaid base theme → all diagrams share visual language → easier comparison across chapters

10.16 See Also

Related Resources

Within This Module:

Design and Accessibility:

Content Creation:

Tools and Templates:

  • Mermaid Theme Template (Section “Quick Reference Card”) - Copy-paste initialization code
  • DrawIO IEEE Palette (available in DrawIO color picker) - Pre-configured color swatches
  • Fig-Alt Writing Guide (Section “Image Standards”) - Accessibility checklist

Examples in Practice:

  • Every chapter in this course follows these standards—observe callout usage, color consistency, and fig-alt descriptions throughout the content

Common Pitfalls

Adding red or bright yellow to diagrams for ‘urgency’ without verifying contrast ratios creates inaccessible content. The IEEE palette already includes Orange (#E67E22) for warnings and Navy (#2C3E50) for structure. Using these consistently trains readers to recognize meaning from color. Custom colors require WCAG 2.1 contrast checking (minimum 4.5:1 ratio) before use in any learning content.

Alt text like ‘Diagram showing system architecture’ is redundant with a caption that says the same thing. Screen readers read both the alt text and the caption. Alt text should describe what is visually encoded: ‘Flow diagram with four boxes labeled Device, Gateway, Cloud, and Application connected by left-to-right arrows, with a feedback loop from Application back to Device.’ Describe the structure and information, not just the subject.

Diagrams created without the standardized base theme template use inconsistent fonts, line weights, and colors that break visual continuity across chapters. Readers who see multiple diagram styles within one section experience increased cognitive load as they adjust to each style. Always initialize new diagrams with the provided theme template, even if the diagram appears simple – style consistency compounds into professionalism at scale.

10.17 What’s Next

If you want to… Read this
Build capstone projects following these visual standards Capstone Projects
Access templates and reference material in the appendix Appendix
Look up terminology used in style documentation IoT Glossary
Review mathematical notation formatting standards Mathematical Foundations
Apply accessibility standards to IoT interface design Interface and Interaction Design