You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-17Lines changed: 18 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,31 +1,20 @@
1
1
# PrismaticAPI
2
2
3
-
PrismaticAPI is a powerful, versatile utility designed to enhance text formatting and color manipulation in your Bukkit/Spigot/Paper plugins. It provides a robust API for converting hexadecimal color codes to Bukkit's ChatColor objects, creating dynamic gradients and rainbow effects, and processing strings for both legacy and modern color formats.
3
+
PrismaticAPI is a powerfulutility library for advanced color manipulation and text formatting in Bukkit/Spigot/Paper plugins. Originally forked from [IridiumColorAPI](https://github.com/IridiumLLC/IridiumColorAPI), PrismaticAPI has since diverged significantly, expanding its functionality and refining its design to offer enhanced features such as dynamic gradients, rainbow effects, and improved support for both legacy and modern RGB color schemes.
4
4
5
5
---
6
6
7
7
## Overview
8
8
9
-
The **PrismaticAPI** package offers a suite of methods to:
10
-
11
-
-**Apply Color Effects:**
12
-
Apply gradient and rainbow effects to strings. These methods generate arrays of `ChatColor` objects that are then applied character-by-character to create smooth color transitions.
13
-
14
-
-**Colorize Text:**
15
-
Process input strings by applying registered color patterns, translating alternate color codes (using `&`), and adjusting output based on the player's client version.
16
-
17
-
-**Strip Formatting:**
18
-
Remove Bukkit, RGB, and special formatting codes from strings to yield plain text.
19
-
20
-
All these functionalities are provided in a single, unified API that makes it simple to integrate advanced color effects into chat messages, GUIs, logs, and more.
9
+
**PrismaticAPI** provides a robust, unified interface to:
10
+
-**Apply Color Effects:** Create smooth gradient and rainbow effects by generating arrays of `ChatColor` values.
11
+
-**Process Strings:** Colorize text by applying a series of registered color patterns and translate alternate color codes.
12
+
-**Strip Formatting:** Remove legacy and modern color formatting to retrieve plain text.
21
13
22
14
---
23
15
24
16
## Key Features
25
17
26
-
-**Color Mapping:**
27
-
Uses an immutable map to associate standard AWT `Color` objects with their corresponding Bukkit `ChatColor` codes.
28
-
29
18
-**Gradient Effects:**
30
19
Create smooth color gradients between two colors by generating an array of intermediary colors that can be applied to text.
31
20
@@ -38,6 +27,17 @@ All these functionalities are provided in a single, unified API that makes it si
38
27
-**Text Processing:**
39
28
Provides methods to apply all registered color patterns to text, as well as strip any color or formatting codes, ensuring clean plain text output when needed.
40
29
30
+
### Key Enhancements Over IridiumColorAPI
31
+
32
+
-**Enhanced Gradient and Rainbow Effects:**
33
+
PrismaticAPI introduces more flexible gradient and rainbow functionalities, enabling smoother and more dynamic color transitions.
34
+
35
+
-**Improved Text Processing:**
36
+
Better handling of color codes and stripping methods, making it easier to manipulate and clean text.
37
+
38
+
-**Optimized API Design:**
39
+
Streamlined methods for applying and stripping colors, and an overall more modular and maintainable codebase.
40
+
41
41
---
42
42
43
43
## Usage Examples
@@ -172,5 +172,6 @@ Replace `${version}` with the appropriate module version.
172
172
173
173
Enhance your plugin’s visual presentation and user experience with PrismaticAPI!
0 commit comments