MrClock's Documentations
  • 🏠Welcome
  • 📄Documents
    • Arma 3 models
      • Proxy coordinates
      • Vertex normals
      • Sections
    • Arma 3 animations
      • Armature reconstruction
      • Frame properties
      • Import into Blender
      • BMTR to plain RTM
  • 📦Blender add-ons
    • Arma 3 Object Builder
  • 🐍Python tools
    • Color converter
  • 🔧Visual Basic .NET tools
    • Color converter
      • Color library TXT
    • Color library and converter
      • Color library XML
    • Class list extractor
    • Editor preview processor
    • Texture converter
  • 🛠️Visual Basic .NET Framework tools
    • Color library and converter
      • COLORLIB file
    • Class list extractor
    • Editor preview processor
    • Generic name ID generator
    • Texture converter
Powered by GitBook
On this page
  • File specification
  • Extension
  • Byte order
  • Data types
  • Structure
  1. Visual Basic .NET Framework tools
  2. Color library and converter

COLORLIB file

Last updated 1 year ago

This file format is used by the second iteration of the , which is still maintained.

The .colorlib file is a special binary file format designed for the color library specifically.

File specification

Extension

  • .colorlib

Byte order

  • Little-endian

Data types

  • string: length prefixed string in UTF-8 encoding, the prefix contains the encoded length as a 7-bit encoded unsigned integer

  • byte: 8-bit unsigned integer

  • uint16: 16-bit unsigned integer

  • uint32: 32-bit unsigned integer

  • single: 32-bit floating point number

Structure

// overall file
ColorLibrary {
	string			header signature			// always "MRC color library"
	uint16			file version
	string			LibraryName
	uint16			padding						// always 0
	
	uint16			nCategories
	ColorCategory	Categories[nCategories]
	
	uint32			EOF signature				// always 0
}

// category
ColorCategory {
	string			CategoryName
	uint16			nColors
	ColorItem		Colors[nColors]
}

// color
ColorItem {
	string			ColorName
	byte			Format						// 0: sRGB 8-bit, 1: sRGB, 2: linear RGB
	byte/single		Red							// byte for Format = 0, single otherwise
	byte/single		Green						// byte for Format = 0, single otherwise
	byte/single		Blue						// byte for Format = 0, single otherwise
}
🛠️
Color converter and library