Class BookHelper

java.lang.Object
io.keikai.range.impl.imexp.BookHelper

public final class BookHelper extends Object
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 Details

  • 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 ignored
      tint - in [-1, 1]
      Returns:
      the transformed 3-byte RGB (no alpha)