mirror of
https://github.com/waaraawa/ByteGrid.git
synced 2026-07-22 06:41:47 +00:00
- Add autoColor option (default: true)
- true: Auto-assign colors to fields without explicit colors
- false: Use gray for fields without explicit colors
- Auto color sequence: blue, cyan, yellow, green, orange, purple, mint, pink
- Padding/reserved fields always use gray
- Explicit colors always take precedence
Examples & Documentation:
- Add 4 example files (basic, manual, mixed, interactive guide)
- Update examples/README.md with Auto Color section
- Add Color Options explanation
Tests:
- Add 8 new tests (5 layoutEngine, 3 parser)
- Update existing test for autoColor: false
36 lines
839 B
YAML
36 lines
839 B
YAML
name: Mixed Color Mode Example
|
|
size: 28
|
|
layout: 16
|
|
# autoColor: true (default) - mix auto and manual colors
|
|
|
|
fields:
|
|
- offset: 0-3
|
|
name: MagicNumber
|
|
type: uint32_t
|
|
color: pink
|
|
description: "Custom color (explicit pink)"
|
|
- offset: 4-7
|
|
name: Version
|
|
type: uint32_t
|
|
description: "Auto-assigned (cyan)"
|
|
- offset: 8-11
|
|
name: Length
|
|
type: uint32_t
|
|
description: "Auto-assigned (yellow)"
|
|
- offset: 12-15
|
|
name: Reserved
|
|
type: reserved
|
|
description: "Always gray for reserved"
|
|
- offset: 16-19
|
|
name: Checksum
|
|
type: uint32_t
|
|
color: mint
|
|
description: "Custom color (explicit mint)"
|
|
- offset: 20-23
|
|
name: Timestamp
|
|
type: uint32_t
|
|
description: "Auto-assigned (orange)"
|
|
- offset: 24-27
|
|
name: Data
|
|
type: uint32_t
|
|
description: "Auto-assigned (purple)"
|