Community listing page, reviews may not be monitored by the author.
ColorAPI
No reviews yet
Lightweight chromatic algebra, color spaces, and animation library for Minecraft Fabric. Features RGB/HSV conversions, easing curves, color transitions, and texture extraction.
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
About
Description
🎨 ColorAPI
ColorAPI is an ultra-lightweight, high-performance mathematical and chromatic animation library designed for modern Minecraft Fabric (1.21.11+). It decouples pure color algebra and timing curves from complex rendering engines, providing a clean, reusable foundation for colored lighting, GUI widgets, particle systems, and cosmetic tinting.
⚡ Core Features
- 🌈 Comprehensive Color Spaces:
* Immutable
ColorRGBrecord supporting sRGB, Linear spaces, gamma correction, alpha channels, and packed ARGB/RGB conversions. *ColorHSVrecord with robust bidirectional RGB \(\leftrightarrow\) HSV mapping. - 🧮 Pure Chromatic Algebra (
ColorMath): * Weighted multi-source color blending (blendColors). * Clamped linear interpolation (lerp). * Photometric attenuation modulation (modulate). * Additive light accumulation (additiveAccumulate). - 📈 Rich Easing & Animation Engine (
EasingMath): * Easing curves: Linear, Ease In/Out, Ease In-Out, Quadratic, Cubic, Sine, Exponential, Bounce, Elastic, and Step. * Temporal transition controller (ColorTransition) for smooth tick-to-tick or frame-to-frame color fading. - 📦 Decoupled Data Structures:
* Standardized
Keyframe,Sequence, andProfilerecords for sequencing complex multi-stage color animations. - 🖼️ Texture & Asset Color Extraction: * Native utilities for calculating dominant/average colors from block sprites and textures.
💻 Developer Quick Start
Add ColorAPI to your build.gradle:
repositories {
mavenCentral()
// or mavenLocal() if building from source
}
dependencies {
modImplementation "mb.bartra:colorapi:1.0"
}
Basic Color Interpolation & Blending:
import mb.bartra.colorapi.ColorAPI;
import mb.bartra.colorapi.core.ColorRGB;
import mb.bartra.colorapi.core.ColorMath;
// 1. Simple Lerp between two hex colors
int startColor = 0xFF0000; // Red
int endColor = 0x0000FF; // Blue
int blended = ColorAPI.lerp(startColor, endColor, 0.5f); // Purple
// 2. Linear Color Modulation
ColorRGB light = ColorRGB.fromRgb(0xFFAA00);
ColorRGB shaded = light.toLinear().multiply(0.75f).toSrgb();
📄 License
ColorAPI is distributed under the open-source MIT License. Free for personal use, modpacks, and third-party mod integrations.
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Get it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources