Package io.keikai.range.impl.imexp
Class BookHelper
java.lang.Object
io.keikai.range.impl.imexp.BookHelper
Minimal helper retained for two cross-module utilities. The full
POI-bound BookHelper has been deleted along with the legacy XLS
import/export pipeline. New code should not add anything here —
prefer the Rust JNI for color / theme / chart computations.
- Author:
- Hawk, Kuro (original)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]getRgbWithTint(byte[] rgb, double tint) Apply Excel's tint/shade transform to a base RGB color.
-
Field Details
-
AUTO_COLOR
- See Also:
-
SORT_NORMAL_DEFAULT
public static final int SORT_NORMAL_DEFAULT- See Also:
-
SORT_TEXT_AS_NUMBERS
public static final int SORT_TEXT_AS_NUMBERS- See Also:
-
SORT_HEADER_NO
public static final int SORT_HEADER_NO- See Also:
-
SORT_HEADER_YES
public static final int SORT_HEADER_YES- See Also:
-
-
Method Details
-
getRgbWithTint
public static byte[] getRgbWithTint(byte[] rgb, double tint) Apply Excel's tint/shade transform to a base RGB color. Tint range is[-1, 1]: positive lightens (mixes toward white), negative darkens (mixes toward black), zero leaves the color unchanged.Reference: ECMA-376 Part 1 §18.8.19 (color transforms); MS-OE376 §A.4.1.16. Algorithm: convert RGB → HSL, scale L by (1 - tint) when tint > 0 or (1 + tint) when tint < 0, convert back to RGB.
- Parameters:
rgb- 3- or 4-byte array; if 4 bytes the first byte (alpha) is ignoredtint- in[-1, 1]- Returns:
- the transformed 3-byte RGB (no alpha)
-